haskell - Altered compose function -


i wondering while f. provide example how should running function? (note: understand (.) function composition , know function composition if)

-- compose function n >= 0 times composen :: int -> (a -> a) -> (a -> a) composen 0 f = id composen n f = f . (composen (n-1) f) 

f arbitrary function, provided user. supply composen succ, increment integer, , have composed 3 times , applied 2, thereby adding 3:

ghci> composen 3 succ 2 5 

Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -