mirror of
https://github.com/rjNemo/functional-programming-jargon
synced 2026-06-11 13:06:42 +00:00
Defined HOF.
This commit is contained in:
parent
adfadf7af0
commit
7f78cfce9e
1 changed files with 12 additions and 1 deletions
11
readme.md
11
readme.md
|
|
@ -19,6 +19,17 @@ console.log(arity);
|
||||||
```
|
```
|
||||||
---
|
---
|
||||||
|
|
||||||
|
## Higher Order Functions (HOF)
|
||||||
|
> A function for which both the input and the output are functions.
|
||||||
|
|
||||||
|
```js
|
||||||
|
let greet = (name) => () => `Hello ${name}!`;
|
||||||
|
```
|
||||||
|
|
||||||
|
```js
|
||||||
|
greet("HOF")(); // Hello HOF!
|
||||||
|
```
|
||||||
|
|
||||||
## Partial Application
|
## Partial Application
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue