[Haskell-fr] euler 4: vos commentaires ?
Dan Popa
popavdan at yahoo.com
Mon Feb 1 14:52:30 EST 2010
Mine was wrong :(
Corrected version:
maximum [ (a*b) | a <- [1..1000], b<- [a..1000], let n'= (show $ a*b) in n' == reverse n' ]
inspired by yours.
Dan
--- On Mon, 2/1/10, David Virebayre <dav.vire+haskell at gmail.com> wrote:
> From: David Virebayre <dav.vire+haskell at gmail.com>
> Subject: Re: [Haskell-fr] euler 4: vos commentaires ?
> To: "La liste Haskell Francophone" <haskell-fr at haskell.org>
> Date: Monday, February 1, 2010, 7:57 AM
> Voilà ce que je trouve :
>
> maximum $ filter (\n -> let n' = show n in n' == reverse
> n') [ a*b | a
> <- [1..999], b <- [a..999] ]
>
> Je regarde mieux ton code à la maison :)
>
> David.
> _______________________________________________
> Haskell-fr mailing list
> Haskell-fr at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-fr
>
More information about the Haskell-fr
mailing list