compose | pipe | Microsoft Interview Question

preview_player
Показать описание
This covers compose and pipe functions. These functions are available in lodash and ramda library. This has been a very popular question being asked in UI/JS interviews.

Рекомендации по теме
Комментарии
Автор

Keep uploading more such concepts... It's really one of the best programming channels..

satyaprakashsahoo
Автор

Great bro. I haven't heard about these anywhere else. Thanks for sharing

muhammedaflah
Автор

if the compose takes multiple arguments, then the code will look like this
const compose = (...fns) => {
return (...x) => {
return fns.reduceRight(
(result, fn, index) => (index == fns.length - 1 ? fn(...x) : fn(result)),
x
);
};
};

abhisheksarmah