4 ms·
I don't know if that kind of syntax used for function captures exists in other languages but I really like it, it's really intuitive. Here is the example : htt
by cassepipe 3y ago
I don't know if that kind of syntax used for function captures exists in other languages but I really like it, it's really intuitive.
Here is the example : https://tour.gleam.run/functions/function-captures/ https://tour.gleam.run/functions/function-captures/
- giraffe_lady 3y agoI think it's not common because primarily functional languages usually have dedicated syntax for partial application or currying, or just do it automatically. Languages not built around functional programming usually seem to consider this sort of thing suspiciously clever, so not having syntax for it is an intentional choice. ReScript just recently removed auto currying (inherited from ocaml) and instead added a very similar syntax for partial application. It just uses ... instead of _ for the arguments.