Skip to content

Commit

Permalink
Merge pull request #349 from coady/master
Browse files Browse the repository at this point in the history
Simplified cons.
  • Loading branch information
eriknw committed Nov 4, 2016
2 parents 9dec542 + a805593 commit 38facbc
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions toolz/itertoolz.py
Original file line number Diff line number Diff line change
Expand Up @@ -511,9 +511,7 @@ def cons(el, seq):
>>> list(cons(1, [2, 3]))
[1, 2, 3]
"""
yield el
for s in seq:
yield s
return itertools.chain([el], seq)


def interpose(el, seq):
Expand Down

0 comments on commit 38facbc

Please sign in to comment.