Ejemplo n.º 1
0
def test_seq_collect(xs: List[int]):
    ys = pipe(xs, seq.collect(seq.singleton))

    assert list(xs) == list(ys)
Ejemplo n.º 2
0
def test_seq_collect(xs: List[int]):
    collector = seq.collect(seq.singleton)
    ys = pipe(xs, collector)

    assert list(xs) == list(ys)
Ejemplo n.º 3
0
def test_seq_collect(xs: List[int]):
    collector: seq.Projection[int, int] = seq.collect(seq.singleton)
    ys = pipe(xs, collector)

    assert list(xs) == list(ys)
Ejemplo n.º 4
0
 def bind(self, xs: Iterable[TSource],
          fn: Callable[[TSource], Iterable[TResult]]) -> Iterable[TResult]:
     return list(seq.collect(fn)(xs))