4

When using higher-order functions like list_map, one needs to build closure-functions and pass them as arguments. Afterwards, the built closures become garbage. Is there a way to build such closure-functions on the call stack (so that they are automatically freed after the call)?

1 Answers1

1

As is specified in the tutorial, you can use the following syntax:

var bar = lam@ (): int => x * y
antoyo
  • 11,097
  • 7
  • 51
  • 82