explain largestDivisible code from the Learn You A Haskell for Great Good tutorial

Posted by Delirium tremens on Stack Overflow See other posts from Stack Overflow or by Delirium tremens
Published on 2010-06-02T18:57:44Z Indexed on 2010/06/02 19:04 UTC
Read the original article Hit count: 158

Filed under:
|
largestDivisible :: (Integral a) => a
largestDivisible = head (filter p [100000,99999..])
    where p x = x `mod` 3829 == 0

If p x equals True, head (filter True)? Filtering for True what list? What values are in p and x?

© Stack Overflow or respective owner

Related posts about beginner

Related posts about haskell