Re:Gleam: a type safe language on the Erlang VM
by pharmakom on Wednesday November 08, 2023 @02:14AM
(#38187576)
Gleam has curried functions by default so F# style pipes make sense imo.
Re:Gleam: a type safe language on the Erlang VM
by hayleighdotdev on Wednesday November 08, 2023 @03:45AM
(#38188066)
Gleam doesn't have auto currying! Often folks find this (currying) a bit confusing to wrap their head around when learning functional programming and we don't feel like it really affords you much that couldn't already be achieved with just a little bit more work by the programmer.
Applicative builder APIs are the only thing we've found would be much much better if we had auto currying.
That allows arbitrary expressions on the RHS of the pipe, so for example this would be valid Gleam:
pub fn main() { io.println( "Hello" |> (_ <> " world") ) }