Re:Introducing Verve: minimalistic, static, functional language
by tadeuzagallo on Friday July 08, 2016 @08:13PM
(#12059440)
I started with colons indicating the return type, but IMO it gets too confusing when you have functions as parameters. e.g. `foo(bar: (int, string): float): float` but that might be just personal preference.
[ Parent
| on HN ]
Re:Introducing Verve: minimalistic, static, functional language
by gre on Friday July 08, 2016 @08:40PM
(#12059522)
Forth and Factor do a double-dash to separate the inputs from the outputs and multiple outputs are allowed. So your example could look something like `foo(bar: (int, string -- float) -- float)` or `foo(bar: (int, string -> float) -> float)`