mapcat
Remove unused element
add License
A stream is an iterable data structure which yields individual values whenever called, potentially until its internal values are exhausted, at which point it's considered dead.
This operation makes them very useful for:
concat, cycle, drop, drop-until, drop-while, filter, from-iterable, map, range, run, take, take-until, take-while, to-array
function | source
(concat & xs)
Concatenate one or more streams or iterables into a single stream.
function | source
(cycle ds)
Repeatedly yield the elements of ds
, looping back to the beginning when finished.
function | source
(drop n ds)
Drop n
elements from ds
.
function | source
(drop-until p ds)
Drop elements from ds
until p
is true.
function | source
(drop-while p ds)
Drop elements from ds
while p
is true.
function | source
(filter p ds)
Create a stream that filters ds
with p
.
function | source
(from-iterable ds)
Create a new stream around any iterable data structure.
function | source
(map f ds)
Create a stream that maps f
over ds
.
function | source
(range from to)
Create a lazy range.
function | source
(run s)
Evaluate s
for side effects.
NB: this will create an infinite loop if s
is an infinite stream!
function | source
(take n ds)
Take n
elements from iterable ds
.
function | source
(take-until p ds)
Return elements from ds
until p
is true.
function | source
(take-while p ds)
Return elements from ds
while p
is true.
function | source
(to-array s)
Consume s
into a new array.
NB: this will create an infinite loop if s
is an infinite stream!