by lgas · 6y ago · 0 comments
sum [ n^2 | n <- [1..5], n % 3 == 1 ]
which seems to express the idea fairly directly and I'm fairly sure has a close analog in python.I just remembered haskell's "range" operator ".." can also take a step size.
['a', 'd' .. 'z'] => "adgjmpsvy"