Skip to content

Commit

Permalink
Add new iterable method
Browse files Browse the repository at this point in the history
  • Loading branch information
bamless committed Dec 12, 2023
1 parent 44c5ada commit 1aab0bc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Binary file modified src/lib/core/iter.jsc
Binary file not shown.
4 changes: 2 additions & 2 deletions src/lib/core/iter.jsr
Expand Up @@ -109,8 +109,8 @@ class Iterable
return interleave(this, sep)
end

fun repeat(n=0)
return repeat(this).take(n).flatten() if n != 0 else repeat(this).flatten()
fun repeat(n=null)
return repeat(this).take(n).flatten() if n else repeat(this).flatten()
end

fun sorted(comparator=null)
Expand Down

0 comments on commit 1aab0bc

Please sign in to comment.