Adds one to a list of integers.(adsbygoogle = window.adsbygoogle || []).push({});

plusOne :: [Integer] -> [Integer]

plusOne = map (+ 1)

I'm having a hard time understanding how this function works. More specifically how recursion happens. Map takes a function and a list and applies that function to every element in the list. In this function, map doesn't seem to be taking a function it just has (+1) but it adds one to the whole list. How does this work?

**Physics Forums | Science Articles, Homework Help, Discussion**

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Understanding Haskell

Loading...

Similar Threads for Understanding Haskell |
---|

How to understand dimensionless data of MacCormack's method |

How do computers understand bits? |

Fortran Runge - Kutta 4 understanding |

**Physics Forums | Science Articles, Homework Help, Discussion**