3 ms·
More abstractly, I enjoyed a description of a text editor in a Categories for Computer Science class I took waay back. It's two stacks head to head. Moving th
by emmelaich 9y ago
More abstractly, I enjoyed a description of a text editor in a Categories for Computer Science class I took waay back.
It's two stacks head to head. Moving the cursor is popping on one and and pushing on the other. All the other operations were given too. There were the category diagrams and everything -- the meat of which I've forgotten but I might be able to find if anyone is interested.
- mcguire 9y agoI'd be interested. Using two stacks is a nifty technique.
- z0r 9y agoThat technique sounds analogous to using a zipper to traverse a list (I've found a decent looking link for the technique if you're interested - https://ferd.ca/yet-another-article-on-zippers.html https://ferd.ca/yet-another-article-on-zippers.html)
- emmelaich 9y agoThis is the book. The preview is limited though and I can't find the editor reference directly. Categories and Computer Science R.F.C Walters, 1992 https://books.google.com.au/books?id=FurEQgAACAAJ&dq=editions:ijJ3X11n3n0C https://books.google.com.au/books?id=FurEQgAACAAJ&dq=edition...