Re: lisp-sound v0.2.1

Liste des GroupesRevenir à cl lisp 
Sujet : Re: lisp-sound v0.2.1
De : enometh (at) *nospam* meer.net (Madhu)
Groupes : comp.lang.lisp
Date : 16. Feb 2025, 06:17:51
Autres entêtes
Organisation : Motzarella
Message-ID : <m3frkewjr4.fsf@leonis4.robolove.meer.net>
References : 1 2 3 4 5 6 7

* zara <m2pljiv7p9.fsf@freecol.be> :
Wrote on Sun, 16 Feb 2025 05:23:30 +0100:
Madhu <enometh@meer.net> writes:
* zara <m2tt8wv3gm.fsf@freecol.be> :
Wrote on Fri, 14 Feb 2025 18:30:33 +0100:
(defun make-dictionary ()
        (let ((*dict ()))
>
        (defun add (value)
                (setq *dict (append *dict (list (length *dict) value))))
>
        (defun get-with-index (index)
                (let ((*index 0))
                        (loop for el in *dict
                                do (if (= (car el) index)
                                        (return (cadr el))
                                (setq *index (+ 1 *index)))
                (return ()))))
>
        (defun dispatch (msg)
                (cond ((eq msg 'add) #'add)
                        ((eq msg 'get-with-index) #'get-with-index)
                        (T (print "make-dictionary : Message not understood"))
                        ))
>
        #'dispatch))


This is still completely wrong and you havent understood it even after
it has been explained 4 times. You CANNOT use DEFUN here to define
add. You HAVE to use LABLES instead of defun.

try loading wavesample.lisp and run the dictionary test again. do you



Date Sujet#  Auteur
10 Feb 25 * lisp-sound v0.2.114zara
10 Feb 25 `* Re: lisp-sound v0.2.113Kaz Kylheku
11 Feb 25  +- Re: lisp-sound v0.2.11Madhu
14 Feb 25  `* Re: lisp-sound v0.2.111zara
14 Feb 25   `* Re: lisp-sound v0.2.110Kaz Kylheku
14 Feb 25    `* Re: lisp-sound v0.2.19zara
16 Feb 25     +* Re: lisp-sound v0.2.15Madhu
16 Feb 25     i`* Re: lisp-sound v0.2.14zara
16 Feb 25     i +- Re: lisp-sound v0.2.11Madhu
16 Feb 25     i `* Re: lisp-sound v0.2.12tpeplt
16 Feb 25     i  `- Actor object System in LISP without CLOS (dictionary example) - was Re: lisp-sound v0.2.11zara
17 Feb 25     `* Re: lisp-sound v0.2.13Kaz Kylheku
17 Feb 25      `* Re: lisp-sound v0.2.12zara
17 Feb 25       `- Re: lisp-sound v0.2.11Kaz Kylheku

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal