0.0.3 • Published 7 years ago

pull-fmap v0.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
7 years ago

pull-fmap NPM version Build Status

fmap function for mapping over functors in a pull stream

This is a blatant rip of code from pull-stream/pull-stream.

pull(
  pull.values([ Just('Hello'), Juts('World'), Nothing ])
  fmap(x => x.toUpperCase()),
  pull.log()
)

// Just(HELLO)
// Just(WORLD)
// Nothing

Installation

$ npm install --save pull-fmap

Usage

fmap = require('pull-fmap')

fmap((data) => data)

fmap(fn) returns a through stream that calls the given fn for each functor's value, in the same order as before. The type of the returned value should be a functor of the same type:

fmap :: Functor f => f a ~> (a -> b) -> f b

Install

With npm installed, run

$ npm install pull-fmap

See Also

License

MIT

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago