by holsee · 3y ago · 0 comments
Pipeline = fun(Functions, Initial) ->
lists:foldl(
fun(Function, Acc) ->
Function(Acc)
end,
Initial,
Functions
),
Initial = SomeFunc(),
Pipeline = [Func0, Func1, Func2, Func3],
Result = Pipeline(Pipeline, Initial).
At a certain point I grew to not mind the punctuations `; , .`I often miss language itself given how verbose things are in elixir by comparison.
The language ecosystem is pretty good with LFE for the Lispers https://lfe.io/ and https://gleam.run/ for the OCaml inclinded.
Val
|> SomeFunc()
|> Func2()
|> Func3()When strict simplicity is not the ultimately goal dare I say leaning into the monads is the way...