1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-30 12:21:25 -08:00

Document with-memoization

* doc/misc/cl.texi (Modify Macros): Document with-memoization.
This commit is contained in:
Lars Ingebrigtsen 2021-10-04 13:23:18 +02:00
parent 8b4a6a722a
commit 43c2cb0a13
2 changed files with 8 additions and 0 deletions

View file

@ -1245,6 +1245,12 @@ blocks for other macros like @code{cl-incf}, and @code{cl-pushnew}.
The @code{cl-letf} and @code{cl-letf*} macros are used in the processing
of symbol macros; @pxref{Macro Bindings}.
@defmac with-memoization @var{place} @var{code}@dots{}
This macro provides a simple way to do memoization. @var{code} is
evaluated and then stashed in @var{place}. If @var{place}'s value is
non-@code{nil}, return that value instead of evaluating @var{code}.
@end defmac
@node Variable Bindings
@section Variable Bindings

View file

@ -78,6 +78,8 @@ The new ':doc-spec-function' element can be used to compute the
mode (instead of at load time).
** subr-x
+++
*** New macro 'with-memoization' provides a very primitive form of memoization