3 ms·
For the uvar example you could get could get close (from news.arc): (mac uvar (u k) `((profs* ,u) ',k)) (def user-age (u) (hours-since (uvar u created)))
by antiismist 17y ago
For the uvar example you could get could get close (from news.arc):
(mac uvar (u k) `((profs* ,u) ',k))
(def user-age (u) (hours-since (uvar u created)))
Without a macro you'd have to call uvar like: (uvar u 'k). For this example I'd favor 'k because it makes the behavior clearer.
(Did you mean uvar instead of upvar?)
- pmarin 17y agonope, I said that I tried to write the html library in the Tcl programming language using the Tcl comands upvar and uplevel trying to simulate the lisp's macros.