view graal/com.oracle.truffle.sl.test/tests/FunctionLiteral.sl @ 13883:ff3136ecb5a7

SL: small changes
author Christian Wimmer <christian.wimmer@oracle.com>
date Wed, 05 Feb 2014 03:16:21 -0800
parents
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);
}