emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Emacs-diffs] master 0f443a1: New library thunk.el


From: Artur Malabarba
Subject: Re: [Emacs-diffs] master 0f443a1: New library thunk.el
Date: Tue, 27 Oct 2015 23:42:54 +0000

> +(defmacro thunk-delay (&rest body)
> +  "Delay the evaluation of BODY."
> +  (declare (debug t))
> +  (let ((forced (make-symbol "forced"))
> +        (val (make-symbol "val")))
> +    `(let (,forced ,val)
> +       (lambda (&optional check)
> +         (if check
> +             ,forced
> +           (unless ,forced
> +             (setf ,val (progn ,@body))
> +             (setf ,forced t)))
> +         ,val))))

Maybe I'm misreading this on my phone, but it looks like this val should be inside the if.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]