Skip to content

Commit d582a38

Browse files
committed
workaround for #9130
1 parent a0df785 commit d582a38

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lib/pure/collections/sequtils.nim

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -548,10 +548,9 @@ template toSeq2(iter: iterator): untyped =
548548
template toSeq*(iter: untyped): untyped =
549549
## Transforms any iterable into a sequence.
550550
runnableExamples:
551-
import sugar
552551
let
553552
numeric = @[1, 2, 3, 4, 5, 6, 7, 8, 9]
554-
odd_numbers = toSeq(filter(numeric, x => x mod 2 == 1))
553+
odd_numbers = toSeq(filter(numeric, proc(x: int): bool = x mod 2 == 1))
555554
doAssert odd_numbers == @[1, 3, 5, 7, 9]
556555

557556
when compiles(toSeq1(iter)):

0 commit comments

Comments
 (0)