Code | Title | Duration | Link |
---|---|---|---|
Keynote | Andy Jassy Keynote Announcement Recap | 0:01 | https://www.youtube.com/watch?v=TZCxKAM2GtQ |
Keynote | AWS re:Invent 2016 Keynote: Andy Jassy | 2:22 | https://www.youtube.com/watch?v=8RrbUyw9uSg |
Keynote | AWS re:Invent 2016 Keynote: Werner Vogels | 2:16 | https://www.youtube.com/watch?v=ZDScBNahsL4 |
Keynote | [Tuesday Night Live with Jame |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def ackermann(m: Int, n: Int): Int = { | |
(m, n) match { | |
case (0, _) ⇒ n + 1 | |
case (m, 0) if m > 0 ⇒ ackermann(m - 1, 1) | |
case (m, n) if m > 0 && n > 0 ⇒ ackermann(m - 1, ackermann(m, n - 1)) | |
} | |
} | |
import scalaz._, Scalaz._, Free.{suspend ⇒ _, _}, Trampoline._ | |
def ackermannTramp(m: Int, n: Int): Trampoline[Int] = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sealed trait Result[+F, S] { | |
def flatMap[FF >: F, SS](f: S => Result[FF, SS]): Result[FF, SS] | |
def map[SS](f: S => SS): Result[F, SS] | |
def fold[X](ff: F => X, fs: S => X): X | |
} | |
case class Failure[+F, S](x: F) extends Result[F, S] { | |
def flatMap[FF >: F, SS](f: S => Result[FF, SS]) = Failure[FF, SS](x) | |
def map[SS](f: S => SS) = Failure[F, SS](x) | |
def fold[X](ff: F => X, fs: S => X) = ff(x) |