Files changed (4)
foldl '\acc x -> if [ -z "$acc" ] || [ "$x" -gt "$acc" ] ; then echo "$x" ; else echo "$acc" ; fi' '' "$@"
foldl '\acc x -> if [ -z "$acc" ] || [ "$x" -lt "$acc" ] ; then echo "$x" ; else echo "$acc" ; fi' '' "$@"
be (possibly) multiple lines to stdout. If a function returns a scalar value, the output will be one line to
+The output for bash expressions manipulated by \fBbashkell\fP functions is also considered as being,
+by default, stdout. For example, if you apply 'echo' to a list using \fImap\fP, the resulting list is
+a concatenation of all the stdout output for each call to 'echo'. However, in some case we are more
+interested in the return code of an expression rather than in it's stdout output. In order to have \fBbashkell\fP
+higher-order functions operate on the return code of an expression instead if on it's output, use \fB-r\fP
+In a way using the return code can be viewed as evaluating the bash expression in a boolean context.
\fBbashkell\fP has support for Haskell-style lambda expressions. These can be used with the higher-order
Returns elements of \fIINPUT\fP for which \fIEXPRESSION\fP is true. Note that here it is the return code
+Note: \fIall\fP evaluates \fIEXPRESSION\fP for ALL input elements. It will not stop after the first
+Prints 0 if \fIEXPRESSION\fP is true for at least 1 input element, prints 1 otherwise. The return code
+Note: \fIany\fP evaluates \fIEXPRESSION\fP for ALL input elements. It will not stop after the first