Skip to content

Commit

Permalink
Merge pull request #307 from quantopian/curry-example
Browse files Browse the repository at this point in the history
DOC: update readme to show toolz.curried.map
  • Loading branch information
eriknw committed May 12, 2016
2 parents 06c75df + bc42c12 commit 2faca0e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ This builds a standard wordcount function from pieces within ``toolz``:
... return word.lower().rstrip(",.!:;'-\"").lstrip("'\"")
>>> from toolz import compose, frequencies, partial
>>> wordcount = compose(frequencies, partial(map, stem), str.split)
>>> from toolz.curried import map
>>> wordcount = compose(frequencies, map(stem), str.split)
>>> sentence = "This cat jumped over this other cat!"
>>> wordcount(sentence)
Expand Down

0 comments on commit 2faca0e

Please sign in to comment.