Slide 17
Slide 17 text
Intro A First DSL Web Services With Http4s Runner’s Paradise DSL Final Encodings and http4s
Final Encoding: Using Multiplication
def mulProgram[A](
implicit E1: Exp[A], E2: ExpMul[A]
): A = {
import E1._, E2._
// 2 * (1 + (10 + 10))
mul(lit(2),
add(lit(1),
add(lit(10),
lit(10))))
}
Markus Hauck (codecentric AG) Functional Web Services slide 16