view graal/com.oracle.truffle.sl.test/tests/FunctionLiteral.sl @ 15923:d0c7bd38e700

computeBlockOrder: no need to check if block is active, since it's anyway
author Bernhard Urban <bernhard.urban@jku.at>
date Tue, 27 May 2014 12:15:31 +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);
}