Skip to content

Latest commit

 

History

16 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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]

About

Fast and simple stream library for Elm

Topics

Resources

Stars

8 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages