I just finished reading a book on scala. What strikes me is that every single example in the whole book was numerical in some form or another.
Like a lot of programm
The more I use a functional style, the better I like it. Consider this Python fragment from another question:
>>> testlist
[1, 2, 3, 5, 3, 1, 2, 1, 6]
>>> [i for i,x in enumerate(testlist) if x == 1]
[0, 5, 7]
This is admittedly a more or less mathematical statement, but there are lots of generators in Python. Once you get used to it, using a list comprehension in place of a loop is both easy to understand, and less likely to have a bug (you don't get "off by one" bugs.)