Ramda JS Tutorial – Part 37 (endsWith + startsWith)

preview_player
Показать описание
Does the list/string end with some given sublist/substring? Plus some interesting composition- and SKI calculus shenanigans :)

Exploring all the functions of the JavaScript library Ramda JS and learning functional programming along the way.

⭐️ Support the channel on Patreon:

👾 In this video:
R.endsWith
R.startsWith
R.compose
R.pipe
R.converge
s combinator (SKI calculus)
Point-free functions

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

Here is another point-free definition that i thought of: (which requires a spread function)

const spread = f => xs => f(...xs);
const endsWith = R.pipe(R.juxt([R.pipe(R.length, R.takeLast), R.unary(R.equals)]), spread(R.pipe))

lunaArtemisOld
Автор

How would you call a function like this??

const ??? = R.flip (R.startsWith)

thanls

oscarhuan
welcome to shbcf.ru