TypeProps icon indicating copy to clipboard operation
TypeProps copied to clipboard

Traversable sample [contribution welcome]

Open SimonMeskens opened this issue 7 years ago • 2 comments

I need a sample in plain JavaScript for traversables, contributions are welcome. If you have a sample, just leave it in here, mentioning you're allowing the code to be licensed under Apache License 2.0.

SimonMeskens avatar May 04 '18 23:05 SimonMeskens

I have three or four instances of traversable in https://github.com/masaeedu/fp/tree/wip/src/instances. See for example arrays, objects and eithers (last one is defined using traverse instead of sequence, for variety).

There's also more abstract stuff like derivations of sequence from traverse and vice versa, or the free recursive traversable functor over any other set of traversable functors.

There should be snapshot tests next to each file showing how to use each thing.

masaeedu avatar May 05 '18 05:05 masaeedu

also see FL, Ramda, npm-ramda.

KiaraGrouwstra avatar May 05 '18 07:05 KiaraGrouwstra