The early few dozen reviews are excellent!
I am glad to have finished it. It is shaping to be my best mobile title. Cheers!
[1 2 3] |> map (* 2) |> filter (> 3) |> fold1 (+)To be intuitive. It takes an array of values (1,2,3), multiplies each by 2 into a new array (2,4,6), filters only values greater than 3 (4 and 6) into a new array, and then calculates the sum starting from the left to be 10 (4 + 6). Of course this is a very generic example. Frankly, I find it easier to understand at a glance, compared to dozens of lines of loops and ugly braces defining scope everywhere. It is a Currying functional style that I have always wanted to embrace, starting with my days, years back, exploring the purely functional language Haskell.
|G_Items.c from Kingpin: Life of Crime|