Are return arguments allowed in anonymous functions?

code: (; Integer x) [x: 100]

error: ERROR: The identifier 'x' does not exist in the current scope.

1 Like

No - return arguments are not currently supported by closures.

They should probably give an error or warning.

Closures use a different mechanism than regular named routines and so return argument support is not trivial to add.

I was debating whether they would be useful to closures - Iā€™m leaning towards, yes they would be useful.

Would they be useful to you?

2 Likes

Yes they would :smiley:

1 Like