Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Blog - Achieving point-free JavaScript - introducing point-free style programming
// From
// Not point-free because we mention the data: name
let initials = (name) => name.split(' ').map(compose(toUpperCase, head)).join('. ');
// Point-free style
let initials = compose(
join('. '),
map(compose(toUpperCase, head)),
split(' ')
initials("hunter stockton thompson");
// 'H. S. T'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.