Skip to content

Instantly share code, notes, and snippets.

View nachinius's full-sized avatar
🏠
Working...

nachinius nachinius

🏠
Working...
  • Berlin, DE
View GitHub Profile

Advanced Functional Programming with Scala - Notes

Copyright © 2016-2017 Fantasyland Institute of Learning. All rights reserved.

1. Mastering Functions

A function is a mapping from one set, called a domain, to another set, called the codomain. A function associates every element in the domain with exactly one element in the codomain. In Scala, both domain and codomain are types.

val square : Int => Int = x => x * x
import cats.{ ApplicativeError, MonadError }
import cats.data.{ Kleisli, OptionT }
import cats.effect.Sync
import cats.effect.concurrent.Ref
import cats.syntax.all._
import io.circe.generic.auto._
import io.circe.syntax._
import org.http4s._
import org.http4s.circe.CirceEntityDecoder._
import org.http4s.circe._
@nachinius
nachinius / sleep5.sh
Created April 29, 2020 12:41 — forked from ignaciopeixoto/sleep5.sh
A shell one-liner for an infinite loop (sh/zsh/bash compatible)
while true; do date; sleep 5; done