RosettaCodeData/Task/Parametric-polymorphism/Haskell/parametric-polymorphism-3.hs

3 lines
97 B
Haskell
Raw Permalink Normal View History

2013-04-10 23:57:08 -07:00
add1Everywhere :: (Functor f, Num a) => f a -> f a
add1Everywhere nums = fmap (\x -> x + 1) nums