Scala port of https://github.com/ntt/reverence