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

3 lines
97 B
Haskell
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
add1Everywhere :: (Functor f, Num a) => f a -> f a
add1Everywhere nums = fmap (\x -> x + 1) nums