-
-
Save gdyrrahitis/0ccaa43189576046a8e597e30437fad0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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