Skip to content

Instantly share code, notes, and snippets.

View PhBastiani's full-sized avatar

Philippe Bastiani PhBastiani

View GitHub Profile
@PhBastiani
PhBastiani / PolymorphicProgram.kt
Last active January 8, 2020 14:25 — forked from JorgeCastilloPrz/PolymorphicProgram.kt
[arrow-kt] PolymorphicProgram
/**
* Arrow 0.10
* How to write polymorphic programs.
* See https://arrow-kt.io/docs/patterns/polymorphic_programs for more details...
*/
package me.jorgecastillo.polymorphicapps.polymorphic
import arrow.Kind
import arrow.core.Option
import arrow.core.left
@PhBastiani
PhBastiani / # ArrowFreePrograms.md
Last active May 27, 2022 15:56
[arrow-kt] Free programs in Kotlin. Additional notes.

Free programs in Kotlin - GADT & ADT Alternatives

Copyright © 2020, Philippe Bastiani.
License: CC BY-NC-SA 4.0

These are additional notes to this GIST : For-Comprehension Free Monads in Kotlin - Mini Howto.

Disclaimer: This GIST assumes that you are roughly familiar with the concept of Free monad.

Source-code compatibility

Λrrow 0.10 (now deprecated)

@PhBastiani
PhBastiani / # ArrowFreePrograms.md
Last active February 5, 2024 02:59
[Arrow-kt] For-Comprehension Free Monads in Kotlin

For-Comprehension Free Monads in Kotlin - Mini Howto

Copyright © 2020, Philippe Bastiani.
License: CC BY-NC-SA 4.0 with this restriction: this GIST could be, all or part, updated, copied, diffused for documentary purposes in the Λrrow project.

This GIST is an attempt to describe a repeatable, and automatable, process for building an embedded Domain Specific Language (DSL) with the help of a Free monad.
As material, i'll use Λrrow, the functional companion to Kotlin's Standard Library.

Disclaimer: This GIST assumes that you are roughly familiar with the concept of Free monad.