if (+ isin $1) { .mode # $1 $2- } This would make the snippet 10x shorter.. (this is an example, there should be checking for op etc.)