The given Uiua example (mercifully given using words rather than the symbols):
[3 4 5 10 23]
divide length on /+
For all the talk about "forward" it's uncomfortable to me how the Uiua evaluation within a line happens backward.
An equivalent in Factor, where keep
is close to on
:
{ 3 4 5 10 23 }
[ sum ] keep length /
But this pattern of doing two things in sequence to the same item is common enough that bi
is handy:
{ 3 4 5 10 23 }
[ sum ] [ length ] bi /
It's been a while, but my clumsy adding of a comment to the buffer is unnecessary, given
zle -M
, which will display a message outside of the buffer. So here's an updated version: