Re: [Haskell-cafe] compare lengths of lists lazily

2011-12-19 Thread Felipe Almeida Lessa
Hahaha, sweet! Had a good laugh with Henning's version. Alexey's one isn't as funny =). -- Felipe. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] compare lengths of lists lazily

2011-12-19 Thread Alexey Khudyakov
On 19.12.2011 19:29, Henning Thielemann wrote: Shortest and most obfuscating solution I found is: import Data.Ord (comparing) import Control.Applicative ((<$)) compareLength :: [a] -> [a] -> Ordering compareLength = comparing (()<$) comparingLength = comparing void It's two character short

[Haskell-cafe] compare lengths of lists lazily

2011-12-19 Thread Henning Thielemann
Shortest and most obfuscating solution I found is: import Data.Ord (comparing) import Control.Applicative ((<$)) compareLength :: [a] -> [a] -> Ordering compareLength = comparing (()<$) :-) ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org htt