
21 Feb
2008
21 Feb
'08
11:07 a.m.
Am Donnerstag, 21. Februar 2008 16:58 schrieb Ben Butler-Cole:
Hello
I was surprised to be unable to find anything like this in the standard libraries:
times :: (a -> a) -> Int -> (a -> a) times f 0 = id times f n = f . (times f (n-1))
times f n = (!! n) . iterate f
[…]
Best wishes, Wolfgang