view graal/com.oracle.truffle.sl.test/tests/FunctionLiteral.sl @ 21801:ea56cec1de34

added missing annotationProcessors to com.oracle.jvmci.debug project
author Doug Simon <doug.simon@oracle.com>
date Tue, 09 Jun 2015 07:51:46 +0200
parents ff3136ecb5a7
children
line wrap: on
line source

function add(a, b) {
  return a + b;
}

function sub(a, b) {
  return a - b;
}

function foo(f) {
  println(f(40, 2));
}

function main() {
  foo(add);
  foo(sub);
}