Functional programming in Kotlin
http://kotlinz.github.io/kotlinz/ โ// momentum
// why it's here
- Active: last commit today
- Built almost entirely by one person
- Health 97/100 with only 55 stars
- Around since 2016 and still shipping
- 14 open issues handled by one or two people
// how to help
// readme
Kotlinz
Typed functional programming for Kotlin: higher-kinded type classes, data types, monad transformers and category-theory constructs, with no dependencies.
Documentation website ยท API reference
- Higher-kinded types via the lightweight
K1<F, A>encoding, soFunctor,Monad,Traversable, โฆ are ordinary interfaces you can write generic code against. - A broad type-class hierarchy: from
Functor/Applicative/Selective/MonadandFoldable/TraversabletoFilterable,Align, MTL-style classes,Comonad,Profunctor,Arrow,Decidable,RepresentableandAdjunction, plus value-levelEq/Order/Show/Hash. - Familiar data types (
Maybe,Either,Try,Validated,IO,State,Reader,Writer, โฆ), persistent data structures (LazyList,Chain,Tree,NonEmptyMap,ListZipper, โฆ), effects (Resource,Ref,Parser,Gen,Logic) and 15 monad transformers. - Profunctor optics (
Iso,Lens,Prism,Optional,Traversal,Getter,Fold,Setter).