logoalt Hacker News

SeanSullivan86yesterday at 2:29 PM1 replyview on HN

Wouldn't you also need to keep track of the stack's size, to know if there are leading zeros?


Replies

entaloneralieyesterday at 2:51 PM

For trailing zeros yeah, or if you care for stack overflow/underflow. Here's a few primitives if you wanna try it out:

https://paste.sr.ht/~rabbits/cd2369cc7c72bfad0fcd83e27682095...