Just a minor comment. In scala/scala we consistently write `def foo(p1: T1, p2: T2): R = ...` without whitespace before colon and with a whitespace after colon. Let's adopt this code style here as well.