Functional Programming - JS Flashcards

1
Q

Currying

A

Карінг - трансформація функції з декількома аргументами у послідовність вкладених унарних функцій.

const add = (x,y) => x + y;
const addCurried = x => y => x + y;
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Partial application

A

Partial application - трансформує функцію в функцію з меншою кількістю аргументів.

Partial application is a process of reducing a function’s arity (the number of its parameters) by creating a new function with some of the arguments passed in.

We take this function and create a new one with one or more of its arguments already “set” or partially applied. частково застосовані

How well did you know this?
1
Not at all
2
3
4
5
Perfectly