Created
December 29, 2014 15:29
-
-
Save TheSeamau5/0033af42fab27ac34e07 to your computer and use it in GitHub Desktop.
Function to perform a given operation a given number of times
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
compute : Int -> (a -> a) -> a -> a | |
compute iterations function argument = | |
if (iterations <= 0) then argument | |
else compute (iterations - 1) function (function argument) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment