TODO - Improve Separation of concerns definition
Kategory has functional datatypes & functional abstractions.
Why functional?
- Referential Transparency: functions have defined parameters and return types, and only operate on the input without modifying values outside of the functions scope
- Purity: Idempotent/deterministic/pure function. Repeated calls to a function yield the same result if the function parameter is unchanged
- Separation of Concerns: Computation is declarative and deferred, with specific nesting and ordering via a tree structure. Runtime evaluation provides the semantic
- goto Conceptual Understanding
- The next two instructions will be for the top level {}, not the ones within buildscript {}
- Open root projects build.gradle and add
maven { url 'https://dl.bintray.com/kategory/maven' }
in the repositories {} - Add
compile 'io.kategory:kategory:0.4.0'
in the dependencies {}
- Assumes you know kotlin
- Bottom up approach because top down is via Category theory/too abstract
- First, goto glossary and replace old code concept knowledge with functional datatypes for Option, Either, and Try
- Then do functional error handling practice within the datatypes package
- TODO Introduce monadic comprehension before MonadError
- Go to the typeclass MonadError to learn about error handling inside of monadic contexts
- Now we have basic control of functional style abstractions and thinking