Skip to content

Commit

Permalink
workaround for #9130
Browse files Browse the repository at this point in the history
  • Loading branch information
timotheecour committed Oct 1, 2018
1 parent a0df785 commit d582a38
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/pure/collections/sequtils.nim
Original file line number Diff line number Diff line change
Expand Up @@ -548,10 +548,9 @@ template toSeq2(iter: iterator): untyped =
template toSeq*(iter: untyped): untyped =
## Transforms any iterable into a sequence.
runnableExamples:
import sugar
let
numeric = @[1, 2, 3, 4, 5, 6, 7, 8, 9]
odd_numbers = toSeq(filter(numeric, x => x mod 2 == 1))
odd_numbers = toSeq(filter(numeric, proc(x: int): bool = x mod 2 == 1))
doAssert odd_numbers == @[1, 3, 5, 7, 9]

when compiles(toSeq1(iter)):
Expand Down

0 comments on commit d582a38

Please sign in to comment.