Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Simple. For every operation performed by the user, you push a function to the end of a list that undoes that operation. When the user presses undo, you pop the function from the end of the list and call it.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: