Skip to content

Instantly share code, notes, and snippets.

@zindel
Last active April 17, 2019 20:10
Show Gist options
  • Save zindel/d97bdc7f5aef10bcf4f8f4a578b659c6 to your computer and use it in GitHub Desktop.
Save zindel/d97bdc7f5aef10bcf4f8f4a578b659c6 to your computer and use it in GitHub Desktop.
ret = box([1,2,3]) >> mapU(lambda x: x * x) >> unbox
print ret
# [1, 4, 9]
print (box() >> mapU(lambda x: x * x) >> unbox)
# None
print (box({"some": "dict"}) >> mapU(lambda x: x * x) >> unbox)
# TypeError
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment