You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bill Hails edited this page Oct 21, 2018
·
7 revisions
A function that takes an argument and returns a function that takes another argument can be called in
one step. This is somewhat the opposite of Currying:
fn adder(x) {
fn (y) { x + y }
}
adder(2, 3); // 5
This would be totally crazy without a separate type checker which deduces the type of adder to be
int -> int -> int before allowing this (see Type Notation for a discussion of ->).