Skip to content

Instantly share code, notes, and snippets.


Philippe Bastiani PhBastiani

View GitHub Profile
PhBastiani / #
Last active Jun 9, 2020
[arrow-kt] Free programs in Kotlin. Additional notes.
View #
PhBastiani / #
Last active Oct 14, 2021
[Arrow-kt] For-Comprehension Free Monads in Kotlin
View #

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.

PhBastiani / PolymorphicProgram.kt
Last active Jan 8, 2020 — forked from JorgeCastilloPrz/PolymorphicProgram.kt
[arrow-kt] PolymorphicProgram
View PolymorphicProgram.kt
* Arrow 0.10
* How to write polymorphic programs.
* See for more details...
package me.jorgecastillo.polymorphicapps.polymorphic
import arrow.Kind
import arrow.core.Option
import arrow.core.left