
16 Sep
2001
16 Sep
'01
11:11 a.m.
Sun, 16 Sep 2001 10:52:07 -0400 (EDT), Mark Carroll pisze:
To multiply apply a function, I'm currently using:
multiplyApply f n a = (iterate f a) !! n
...is there a Prelude function I've missed that already does this?
Unfortunately not.
Could I be doing this better?
I think an explicit recursion would make it easier to compile efficiently, and it can give a better error message for n < 0. -- __("< Marcin Kowalczyk * qrczak@knm.org.pl http://qrczak.ids.net.pl/ \__/ ^^ SYGNATURA ZASTÊPCZA QRCZAK
8647
Age (days ago)
8647
Last active (days ago)
0 comments
1 participants
participants (1)
-
Marcin 'Qrczak' Kowalczyk