An chaining operator like elixir's |> but appends additional arguments i.e. a zip b <| c <| d is a zip with b with c with d is zip(a, b, c, d).
I think <| will look nice when you want to provide an argument per line:
a zip b
<| c
<| d
;
Function parameters should be the last parameter
When you inline function arguments with multi-line lambdas, any arguments following multi line lambda become unreadable. i.e. from start in the following:
rng fold (\accum, el ->
(
# multi line
# lambda
)) from start;
So I think having fold1 :: [a] -> (a -> a -> a) -> a and fold :: [a] -> a -> (a -> a -> a) -> a is better alternative than an optional from as you could write:
rng fold start <| (\accum, el ->
(
# multi line
# lambda
));
Generic
from
with
An chaining operator like elixir's
|>
but appends additional arguments i.e.a zip b <| c <| d
isa zip with b with c with d
iszip(a, b, c, d)
.I think
<|
will look nice when you want to provide an argument per line:Function parameters should be the last parameter
When you inline function arguments with multi-line lambdas, any arguments following multi line lambda become unreadable. i.e.
from start
in the following:So I think having
fold1 :: [a] -> (a -> a -> a) -> a
andfold :: [a] -> a -> (a -> a -> a) -> a
is better alternative than an optionalfrom
as you could write:Good luck with this language 👍.