Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/IterTools.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
module IterTools

import Base.Iterators: drop, take
using Base.Iterators: takewhile

import Base: iterate, eltype, length, size, peek
import Base: tail
Expand Down Expand Up @@ -920,11 +919,14 @@ function iterate(ff::FlagFirst, state = (true, ))
(isfirst, elt), (false, nextstate)
end

const takewhile = Iterators.takewhile

"""
takewhile(cond, xs)

An iterator that yields values from the iterator `xs` as long as the
predicate `cond` is true.
Alias for `Iterators.takewhile`.

```jldoctest
julia> collect(takewhile(x-> x^2 < 10, 1:100))
Expand Down