-
-
Save rsp/b6d3a3338b9c0f66bd908b22bce26a41 to your computer and use it in GitHub Desktop.
inFullMobile Language Wars: Round 1 - Haskell Solution 1 by @domhys - See: https://gist.github.com/rsp/d8bdbafa09f24f99eebc8ed60fe205c8
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
| composeXTimes :: (a -> a) -> Int -> a -> a | |
| composeXTimes f x = foldr (.) id (replicate x f) | |
| f :: (Num a1, Num t) => ((a1 -> a1) -> t -> Int) -> (a -> a) -> a -> a | |
| f a g x = composeXTimes g h x | |
| where h = ((a incr 0) - 1) where incr x = x + 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment