From 3773a5e997fd155a0ec02ce0af15ea82d4a2ca4c Mon Sep 17 00:00:00 2001 From: Tylor Steinberger Date: Thu, 16 Mar 2017 14:13:11 -0400 Subject: [PATCH] docs(README): add basic readme --- README.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..f4d652a --- /dev/null +++ b/README.md @@ -0,0 +1,28 @@ +# Purescript Stream + +> An ultra-fast reactive stream library for purescript + +## Let me have it +```sh +bower install --save purescript-stream +``` + +## Basic usage +```purescript +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 +``` \ No newline at end of file