In practice
alias 'lspy=ls *.py'
lspy() { ls *.py "$@" }
You can make it an alias of * , / etc, so ...
$ * 4 6 24 $
The persistent process could almost any repl of python, ruby etc.
Or use a 'real' calculator like Pike's ivy; https://aplwiki.com/wiki/Ivy
[ is a valid function name tho so fun could be had there.
So you could use = to start the calc, and use infix or postfix notation.
You can make it an alias of * , / etc, so ...
It would keep it's own stack, but let a persistent process do the actual maths.The persistent process could almost any repl of python, ruby etc.
Or use a 'real' calculator like Pike's ivy; https://aplwiki.com/wiki/Ivy