Suppose we wish to inspect our PATH
. Then we can make it more readable using
awk:
BEGIN {FS = ":"; OFS = "\n"}
{$1=$1 ; print $0}
This will give something like:
/Users/vanessa/.opam/default/bin
/Users/vanessa/.cabal/bin
/Users/vanessa/.ghcup/bin
/usr/local/bin
/usr/bin
/bin
/usr/sbin
/sbin
/Library/TeX/texbin
...
We can do the same in Jacinda, viz.
fn path(x) :=
[x+'\n'+y] |> (splitc x ':');
path¨$0
I think the functional style (especially the absence of global variables) is far preferable.