lzip: Zipping and unzipping a lazy stream

Description Usage Arguments Examples

Description

When zipping, if the size of arguments are different, the shortest one is used for output, i.e., excess elements are discarded.

Usage

1
2
3
4
5
6
7
8
9
lzipWith2(f, x, y)

lzipWith(f, ...)

lzip(...)

lunzip2(xs)

lunzip(xs)

Arguments

f

zipping function

x, y

llist

...

lazy stream objects

xs

llist of llist

Examples

1
2
3
4
5
6
lint <- liota()
ltake(lzipWith(`*`, lint, lint), 10)
ltake(lzip(lint, lint, lint), 10)

lunzip(lzip(0%..%2, 100%..%200, 10%..%Inf))
# => list(list(0, 1, 2), list(100, 101, 102), list(10, 11, 12))

TobCap/lazystreamr documentation built on May 9, 2019, 4:50 p.m.