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.

functionalInterfaces.zs 376B

1234567891011121314151617
  1. //val x = ((a as string) => "hello" + a) as function`auto(a as string) as string`auto;
  2. //invokeFunctional(x);
  3. val y = (a as int, b as int) => a + b;
  4. //invokeFunctionalInt((a, b) => a + b);
  5. invokeFunctionalInt(y);
  6. println(((x as int) => x)(10));
  7. //TODO: Globals can't be "captured"
  8. //invokeFunctionalInt((a, b) => {
  9. // println("a");
  10. // return a + b;
  11. //});