Skip to content

v2.0.0-MI4 of cyclops-react - Kleisli and new Monad types

Compare
Choose a tag to compare
@johnmcclean johnmcclean released this 22 Feb 15:35
· 1269 commits to master since this release

2.0.0-MI4 of cyclops-react

What’s new cyclops-react v2 Milestone 4?

New Monads and types for working with Monads

  • Kleisli
  • Cokleisli
  • Writer
  • State
  • ReaderWriterState

Kleisli example

Define a function that creates a Stream

import cyclops.monads.Witness.reactiveSeq;



Kleisli<reactiveSeq, Integer, Integer> k1 = t -> ReactiveSeq.iterate(0,i->i<t, i->i+1)
                                                            .anyM();

k1.flatMap(i-> t-> ReactiveSeq.of(t+i)
                              .anyM())
  .apply(10)
  .forEach(System.out::println);

10
11
12
13
14
15
16
17
18
19

Changelog

Check out the features delivered and bugs fixed -

github 2.0.0-MI4 issues & PRs

Dependency upgrades

None this time

Get cyclops-react

Gradle

compile 'com.aol.simplereact:cyclops-react:2.0.0-MI4’

Maven

<dependency>
    <groupId>com.aol.simplereact</groupId>
    <artifactId>cyclops-react</artifactId>
    <version>2.0.0-MI4</version>
</dependency>

Documentation

Articles

Old simple-react landing page

License

cyclops-react is licensed under the Apache 2.0 license.

http://www.apache.org/licenses/LICENSE-2.0#