Skip to content
This repository has been archived by the owner on Sep 1, 2020. It is now read-only.

Commit

Permalink
Deprecate Iterators.jl in favour of IterTools.jl (#105)
Browse files Browse the repository at this point in the history
  • Loading branch information
iamed2 authored and ararslan committed Jun 23, 2017
1 parent 171aa99 commit fd45208
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
11 changes: 9 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@

Common functional iterator patterns.

## DEPRECATION

Iterators.jl has been deprecated in favour of [IterTools.jl](https://github.com/JuliaCollections/IterTools.jl).
Please update your package dependencies: Iterators 0.3.1 maps to IterTools 0.1.0.

See [#104](https://github.com/JuliaCollections/Iterators.jl/issues/104) for more information.

## Installation

Install this package with `Pkg.add("Iterators")`
Expand Down Expand Up @@ -98,7 +105,7 @@ Install this package with `Pkg.add("Iterators")`
i = 3
```
- **nth**(xs, n)

Return the n'th element of `xs`. Mostly useful for non indexable collections.

Example:
Expand All @@ -111,7 +118,7 @@ Install this package with `Pkg.add("Iterators")`
```

- **takenth**(xs, n)

Iterate through every n'th element of `xs`

Example:
Expand Down
6 changes: 5 additions & 1 deletion src/Iterators.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ __precompile__()

module Iterators

function __init__()
warn("Iterators.jl is deprecated; use IterTools.jl instead")
end

# gets around deprecation warnings in v0.6
if isdefined(Base, :Iterators)
import Base.Iterators: drop, countfrom, cycle, take, repeated
Expand Down Expand Up @@ -163,7 +167,7 @@ end

"""
chain(xs...)
Iterate through any number of iterators in sequence.
```jldoctest
Expand Down

0 comments on commit fd45208

Please sign in to comment.