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)
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)