3 ms·
> print $ maximum $ map (\a0 -> (collatzLen a0, a0)) [1..max_a0] I think the last bit of the line is: for a0 in range(1,max_a0): collatzLen(a0,a0)
by wisty 13y ago
> print $ maximum $ map (\a0 -> (collatzLen a0, a0)) [1..max_a0]
I think the last bit of the line is:
for a0 in range(1,max_a0):
collatzLen(a0,a0)
a0 is basically the loop variable.
- evincarofautumn 13y agoFunction application has high precedence in Haskell, so it would be (collatzLen(a0), a0).