Wednesday, May 2, 2012

The zap function in arc lisp

Arc provides the zap function which is a function that applies a transformation to some place form. The following examples of the zap function are provided by the arc documentation:
(let s "abc" (zap upcase (s 0)) s)
(let x '(10 10) (zap mod (car x) 3) x)
This provides a more general means of handling memory management operations then setf. Most memory management operations can be described in terms of zap.

No comments:

Post a Comment