4 ms·
> It's more that how a lambda can only contain a single expression That's exactly how lambdas (and all functions) work in actually functional languages like Ha
by bPspGiJT8Y 3y ago
> It's more that how a lambda can only contain a single expression
That's exactly how lambdas (and all functions) work in actually functional languages like Haskell. And it's a good thing,lambdas shouldn't allow statements.
> how you can't pipe/chain things
Ironically after switching from Elixir to a language where I can have any operator I wish, I found myself using the equivalent of Elixir's |> only on a very rare occasion. IMO they're vastly overrated.
- matsemann 3y agoHmm, you can surely use multiple lets in a lambda in haskell, as in every other function? And it doesn't have to be the pipe operator, just something similar. Like list.map().filter().reduce() instead of reduce(filter(map(list))) which quickly gets unwindly.