Skip to content

Instantly share code, notes, and snippets.

Created August 10, 2017 06:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/a4f11b10bf8f966d8ae9d56f5dc9194d to your computer and use it in GitHub Desktop.
Save anonymous/a4f11b10bf8f966d8ae9d56f5dc9194d to your computer and use it in GitHub Desktop.
the description for this gist
// builds a 10 + (((0 + 1)+1)+1) expression
def buildIncrementExpression() = new ScalaToLanguageBridge[Int] {
override def apply[Wrapper[_]](implicit L: Language[Wrapper]): Wrapper[Int] = {
L.add(L.number(10), L.increment(L.increment(L.increment(L.number(0)))))
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment