Hacker News new | past | comments | ask | show | jobs | submit login

The OP seems to be conflating two different things: undoing an action (closing a file, etc), and performing the inverse of a reversible function.

The first is amply covered by the RAII/unwind-protect etc idioms than most languages do have.

The second is not, as most programming languages don't have the concept. The closest I can think of is the ability to use a predicate in either direction in Prolog (or logical programming in general)

Applications are open for YC Summer 2019

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