Skip to content

Instantly share code, notes, and snippets.

@3v0k4
Last active December 21, 2019 00:07
Show Gist options
  • Select an option

  • Save 3v0k4/dee7f87bdcf0248f4c95ffd3c7c81ae8 to your computer and use it in GitHub Desktop.

Select an option

Save 3v0k4/dee7f87bdcf0248f4c95ffd3c7c81ae8 to your computer and use it in GitHub Desktop.
const toString = i => String(i) // <-- added this
const functional = s =>
Right(s)
.chain(parse)
.chain(first)
.map(toString) // <-- added this
.chain(format)
const functional2 = ss => ss.map(functional) // <-- added this
functional2(['[1,2,3]', '[4,5,6]'])
// [ Right(1!), Right(4!) ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment