either(Result, Error) = tql_either:either(Result, Error)
id/1 | Returns the argument itself. |
pipe/2 | Thread a value through a set of unary functions. |
id(A) -> A
Returns the argument itself.
This is useful for composition and as a generic helper.pipe(Arg, Funs) -> Res
Thread a value through a set of unary functions.
The first function receives the provided argument as its input, with
its output being passed to the next function, and so on. When the
provided list of functions is empty, this amounts to id
.
Funs = [fun string:titlecase/1, fun string:reverse/1], Res = tql:pipe("this is an example", Funs), Res = "elpmaxe na si sihT".
Generated by EDoc