argument lists and associated N-ary map and apply functions
the empty argument list *
The preferred way to factor out an Args
sub-sequence:
let args =
Foo.Args.(
bar "A"
(* TODO: factor out the common baz qux sub-sequence *)
@> baz "B"
@> qux "C"
@> zap "D"
@> nil
)
is to write a function that prepends the sub-sequence:
let baz_qux remaining_args =
Foo.Args.(
baz "B"
@> qux "C"
@> remaining_args
)
and splice it back into the original sequence using @@
so that things line up
nicely:
let args =
Foo.Args.(
bar "A"
@> baz_qux
@@ zap "D"
@> nil
)