A stream library for purescript
Go to file
2017-03-20 21:38:09 -04:00
.github feat(stream): start of a stream library 2017-03-12 19:48:37 -04:00
src/Control fix(Stream): add missing filter import 2017-03-20 21:37:49 -04:00
test chore(stream): fix dependencies 2017-03-16 13:52:28 -04:00
.editorconfig feat(stream): start of a stream library 2017-03-12 19:48:37 -04:00
.eslintignore feat(stream): reimplement 2017-03-16 13:45:06 -04:00
.eslintrc feat(stream): start of a stream library 2017-03-12 19:48:37 -04:00
.gitignore chore(gitignore): remove npm debug log 2017-03-16 13:53:31 -04:00
.travis.yml feat(stream): start of a stream library 2017-03-12 19:48:37 -04:00
bower.json chore(stream): fix dependencies 2017-03-16 13:52:28 -04:00
CHANGELOG.md docs(CHANGELOG): amend changelog 2017-03-20 21:38:09 -04:00
CONTRIBUTING.md feat(stream): start of a stream library 2017-03-12 19:48:37 -04:00
LICENSE.md feat(stream): start of a stream library 2017-03-12 19:48:37 -04:00
package.json chore(package): v0.2.0 2017-03-20 21:38:06 -04:00
README.md docs(README): add basic readme 2017-03-16 14:13:11 -04:00
yarn.lock chore(package): setup npm scripts 2017-03-12 21:39:42 -04:00

Purescript Stream

An ultra-fast reactive stream library for purescript

Let me have it

bower install --save purescript-stream

Basic usage

module Main where

import Prelude
import Control.Monad.Eff (Eff)
import Control.Monad.Eff.Console (CONSOLE, logShow, log)
import Control.Stream (STREAM, periodic, constant, scan, tapEvent, tapEnd, drain)
import Data.Unit (Unit)

main :: Eff (stream :: STREAM, console :: CONSOLE) Unit
main = do
  periodic 1000.0 -- Stream Unit
    # constant 1 -- Stream Int
    # scan (+) 0 -- Stream Int
    # tapEvent logShow -- Perform side-effects on events
    # tapEnd (log "done") -- Perform a side-effect on stream completion
    # drain -- activate your stream