klequis / zz-haskell-notebook

Notes from learning Haskell
1 stars 0 forks source link

Anonymous function #60

Open klequis opened 2 years ago

klequis commented 2 years ago

An anonymous function is a function that is not bound to an identifier and is instead passed as an argument to another function and/or used to construct another function. See the following examples:

\x -> x  -- anonymous version of id
id x = x  -- not anonymous, it's bound to 'id'
klequis commented 2 years ago

Needs detail on syntax, specifically \ & ->.