[Haskell-beginners] Re: Haskell Generic Function Question
Ertugrul Soeylemez
es at ertes.de
Fri May 29 19:32:48 EDT 2009
Jeff Wheeler <jeff at nokrev.com> wrote:
> > f = \x -> (x `quot` 10, x `mod` 10)
>
> Your function f is almost the same as divMod in Prelude. Also, using a
> lambda function seems odd; this is simpler:
>
> > f x = (x `quot` 10, x `mod` 10)
Hmm, simplicity.
f = (`quot` 10) &&& (`mod` 10)
SCNR.
Greets,
Ertugrul.
--
nightmare = unsafePerformIO (getWrongWife >>= sex)
http://blog.ertes.de/
More information about the Beginners
mailing list