Skip to content

Instantly share code, notes, and snippets.

View zlangbert's full-sized avatar

Zach Langbert zlangbert

View GitHub Profile

Applied Functional Programming with Scala - Notes

Copyright © 2016-2018 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
@pathikrit
pathikrit / README.md
Last active April 24, 2021 17:36
My highly opinionated list of things needed to build an app in Scala
@milessabin
milessabin / tuplegeneric.scala
Last active March 13, 2023 20:27
Convert (small enough) case classes to and from tuples using shapeless ...
import shapeless._
import ops.hlist.Tupler
trait TupleGeneric[C <: Product] extends Serializable {
type Repr <: Product
def to(t : C) : Repr
def from(r : Repr) : C
}