Last active
October 6, 2015 17:36
-
-
Save raine/ae658e489421e2ec970e 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 lineLens = lens(split('\n'), join('\n')); | |
const mapLines = curry((fn, str) => | |
over(lineLens, map(fn), str)); | |
const adjustLine = curry((fn, n, str) => | |
over(lineLens, adjust(fn, n), str)) | |
mapLines(toUpper, 'foo\nbar') // => 'FOO\nBAR' | |
adjustLine(toUpper, 0, 'foo\nbar') // => 'FOO\nbar" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment