ZenScript main repository
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

12345678910111213141516171819
  1. val outOfScope = 10;
  2. val fun = (a as int, b as int) as int => a + b * outOfScope;
  3. println(fun(30, 20));
  4. function apply_fn2(fn as function(value as int, othervalue as int) as int, value as int) as int {
  5. return fn(value, value);
  6. }
  7. //function scale(value as int, scale as int) as int {
  8. // val fun as function(value as int, othervalue as int) as int = ((v as int) as int => v * scale);
  9. // return apply(fun, scale);
  10. //}
  11. apply_fn2(fun, 10);
  12. //println("Value: " + scale(10, 5));