Cambridge-ICCS / ss23-git

Repository for the GitHub talk in ICCS Summer School '23.
1 stars 10 forks source link

Add unary "discard" operator #6

Open raehik opened 1 year ago

raehik commented 1 year ago

p pops the element on the top of the stack and prints it. Perhaps in some interactive sessions, you may want to discard the top of the stack without printing it.

Could use d for this.

SimonClifford commented 1 year ago

I like this. Let's get a test built that uses the d operator.

SimonClifford commented 1 year ago

E.g. something like:

3 4 5 d + p   (stack should hold 7)

maybe?