first-time-value

Public Domain

Returns the result of evaluating a form in the current lexical and dynamic context the first time it's encountered, and the cached result of that computation on subsequent evaluations.

$ area51 add first-time-valueCopy

Usage

;; area51 add updates your .asd automatically.
;; Use the package in your code:
(in-package :my-project)
(first-time-value:some-function ...)

Dependencies