February 2018
Intermediate to advanced
350 pages
7h 35m
English
There is some confusion between currying and partial application. Some authors treat them as synonymous, but they are different:
import arrow.syntax.function.curriedimport arrow.syntax.function.invokefun main(args: Array<String>) { val strong: (String, String, String) -> String = { body, id, style -> "<strong id=\"$id\" style=\"$style\">$body</strong>" } println(strong.curried()("Batman Begins")("trilogy1")("color:black")) // Curried println(strong("The Dark Knight")("trilogy2")("color:black")) // Fake curried, just partial application println(strong(p2 = "trilogy3")(p2 = "color:black")("The Dark Knight rises")) // partial application }
The differences are significant and they can help ...
Read now
Unlock full access