Skip to content

Instantly share code, notes, and snippets.

@gdyrrahitis

gdyrrahitis/ramda.js Secret

Created Jul 10, 2019
Embed
What would you like to do?
const R = require('ramda');
const append = (text) => (value) => value + text;
const removeTheLetter = (letter) => (sentence) =>
sentence
.split('')
.filter(c => c !== letter)
.join('');
const makeLetterUpperCase = (letter) => (sentence) =>
sentence.split('')
.map(c => c === letter ? c.toUpperCase() : c)
.join('');
const removeWordsWithLessThanFourLetters = (sentence) =>
sentence
.split(' ')
.filter(word => word.length > 4)
.join(' ');
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.