Skip to content

Instantly share code, notes, and snippets.

View isthatcentered's full-sized avatar

Edouard isthatcentered

  • Lille, remote
View GitHub Profile
export interface None {
readonly _tag: "None"
}
export interface Some<A> {
readonly _tag: "Some"
readonly value: A
}
export type Option<A> = None | Some<A>
@merikan
merikan / Jenkinsfile
Last active May 13, 2024 14:27
Some Jenkinsfile examples
Some Jenkinsfile examples

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