realworldocaml / book

V2 of Real World OCaml
https://dev.realworldocaml.org
Other
1.19k stars 174 forks source link

New comment on block [block-idp6080784] #2464

Open Justinfront opened 11 years ago

Justinfront commented 11 years ago

This sentence was long and hard to absorb could it be broken in two and/or have the 'but' removed? I just found it hard to take in. Below is my attempt, which is probably not better.

The notation for the type-signature of a multi-argument function, can seem surprising. We will explain where it comes from when we get to function currying in the section called “Multi-argument functions”.

bactrian commented 11 years ago

This comment references this from milestone beta3: https://realworldocaml.org/beta3/en/html/a-guided-tour.html#idp6080784

Context:

The notation for the type-signature of a multi-argument function may be a little surprising at first, but we'll explain where it comes from when we get to function currying in the section called “Multi-argument functions”. For the moment, think of the arrows as separating different arguments of the function, with the type after the final arrow being the return value. Thus, int -> int -> float describes a function that takes two int arguments and returns a float.