view graal/com.oracle.truffle.sl.test/tests/FunctionLiteral.sl @ 18482:b8a622c3e99f

Move raw memory access operations to a separate interface.
author Roland Schatz <roland.schatz@oracle.com>
date Thu, 20 Nov 2014 17:00:19 +0100
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);
}