view graal/com.oracle.truffle.sl.test/tests/FunctionLiteral.sl @ 15489:d0e3f6963ed7

mx: made parallel Java builds interact correctly with management of subprocesses upon abort/quit
author Doug Simon <doug.simon@oracle.com>
date Sun, 04 May 2014 01:26:50 +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);
}