• Re: a hardware Lisp interpreter

    From B. Pym@21:1/5 to Levi Campbell on Sat Jul 19 03:58:28 2025
    XPost: comp.lang.scheme

    Levi Campbell wrote:

    (defun lookup-variable (search-name)
    (loop for (name . value) in *variables* do
    (when (eql name search-name)
    (return-from lookup-variable value))))

    Gauche Scheme:

    (use srfi-42) ;; first-ec
    (use util.match)

    (define (lookup search-name)
    (first-ec #f
    (:list e Variables)
    (begin (match-define (name . value) e))
    (if (eqv? search-name name))
    value))


    --
    [T]he problem is that lispniks are as cultish as any other devout group and basically fall down frothing at the mouth if they see [heterodoxy].
    --- Kenny Tilton
    The good news is, it's not Lisp that sucks, but Common Lisp. --- Paul Graham

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)