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

Add Interleave (r2) #57

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

oxinabox
Copy link
Member

Interleave is the complement to chain.
It takes from each iterator in turn.
It is required to implement things like Minikanren.

This PR replaces the failed #54
I think it is now squashed right

Added the Interleave iterator

"""
Interleave is the transpose of chain.
It returns one element from each of the iterators in turn.
If one of the interators runs dry then it is skippted
eg:
```
collect(interleave([1,2,3],[10,20,30,40,50],[0.1,0.2]))
>[1,10,0.1,2,20,0.2,3,30,40,50]
```
"""

Add Interleave documentation

Improve doc formatting

remove duplicate import in interleave

Remove odd type
@oxinabox
Copy link
Member Author

travis is saying this is broken in the nightly.
This is because the Whole of Iterators.jl is broken in the nightly.
because #56
for a start.

@oxinabox oxinabox closed this May 18, 2016
@oxinabox oxinabox reopened this May 18, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant