This is an alternative site for discovering Elm packages. You may be looking for the official Elm package site instead.
1.0.0 1.0.1
Fast and simple stream library for Elm.
version 1.1.0
license MIT
native-modules False
elm-version 0.18.0 <= v < 0.19.0
Tag 1.1.0
Committed At 2017-12-06 02:27:41 UTC
elm-lang/core 5.1.1 <= v < 6.0.0 5.1.1

Modules

README

elm-stream

Fast and simple stream library for Elm. Create streams of data or flatten multiple operations over lists.

Streams flatten operations like map and filter so you don't have to iterate through a stream multiple times like a list.

import Stream


Stream.range 1 1000
    |> Stream.map (\n -> n * 2)
    |> Stream.filter (\n -> n > 10)
    |> Stream.take 3
    |> Stream.toList == [12, 14, 16]

You can use streams with lists of data too.

[1, 2, 3, 4, 5]
    |> Stream.fromList
    |> Stream.map (\n -> 2 ^ n)
    |> Stream.filter (\n -> n > 8)
    |> Stream.toList == [16, 32]