Skip to content

Instantly share code, notes, and snippets.

View nsitbon's full-sized avatar

Nicolas Sitbon nsitbon

  • Mantes la Ville, France
View GitHub Profile

Advanced Functional Programming with Scala - Notes

Copyright © 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
@nsitbon
nsitbon / gist:21f2bdcb4d7ab5108588250ab300f5cb
Last active September 28, 2016 12:54
doc akka streams
import akka.actor.ActorSystem
import akka.stream.ActorMaterializer
import akka.stream.scaladsl.{Flow, Keep, Sink, Source}
import akka.{Done, NotUsed}
import scala.concurrent.duration.Duration
import scala.concurrent.{Await, Future}
object App {
def main(args: Array[String]): Unit = {
@nsitbon
nsitbon / bash-cheatsheet.sh
Last active September 22, 2015 12:52 — forked from LeCoupa/bash-cheatsheet.sh
Bash CheatSheet for UNIX Systems
#!/bin/bash
#####################################################
# Name: Bash CheatSheet for Mac OSX
#
# A little overlook of the Bash basics
#
# Usage:
#
# Author: J. Le Coupanec
# Date: 2014/11/04