5 ms·
But to become a fully erudite member of modern society, you might want to also study zipWith :: (a-> b -> c) -> [a] -> [b] -> [c] :-)
by fhars 16y ago
But to become a fully erudite member of modern society, you might want to also study
zipWith :: (a-> b -> c) -> [a] -> [b] -> [c]
:-)
- aristidb 16y agoAllowing one to simplify to: fibs = 1 : 1 : zipWith (+) fibs (tail fibs) Involving zip`ap`tail, the Aztec god of consecutive numbers: fibs = 1 : 1 : (zipWith (+) `ap` tail) fibs Or, pointlessly: fix $ (1:) . (1:) . (zipWith (+) `ap` tail)