evhub / coconut

Simple, elegant, Pythonic functional programming.
http://coconut-lang.org
Apache License 2.0
4.09k stars 125 forks source link

Return type annotations for statement lambdas #715

Closed evhub closed 2 months ago

evhub commented 1 year ago

Unfortunately, since -> is used for the lambda itself, we can't also use it for the return type annotation. Thus, instead, we'd be forced to implement something like

f = def (x: int): int -> x

which is somewhat confusing, making this a bit questionable.

evhub commented 2 months ago

This was fixed a while ago with #763.