I want to compound growth over a year but I don't care about decimal points, so I tried
take 52 $ iterate (floor . (*1.1)) 100
The problem is that the type of (floor . (*1.1))
is Double -> Integer
, whereas the type expected by the first arg of iterate is a -> a
.
I tried a couple of approaches, but ended up tying myself in knots.
What is the preferred solution to keeping numeric types consistent across function application?
floor
out of theiterate
and domap floor . take 52 $ ...
?