| Deutsch English Français Italiano |
|
<m3frkewjr4.fsf@leonis4.robolove.meer.net> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail From: Madhu <enometh@meer.net> Newsgroups: comp.lang.lisp Subject: Re: lisp-sound v0.2.1 Date: Sun, 16 Feb 2025 10:47:51 +0530 Organization: Motzarella Lines: 36 Message-ID: <m3frkewjr4.fsf@leonis4.robolove.meer.net> References: <m2h652z7r6.fsf@freecol.be> <20250210103727.26@kylheku.com> <m25xlcbpf0.fsf@freecol.be> <20250214082349.300@kylheku.com> <m2tt8wv3gm.fsf@freecol.be> <m3zfimwwad.fsf@leonis4.robolove.meer.net> <m2pljiv7p9.fsf@freecol.be> MIME-Version: 1.0 Content-Type: text/plain Injection-Date: Sun, 16 Feb 2025 06:17:46 +0100 (CET) Injection-Info: dont-email.me; posting-host="96076b96ae386e56c6d20a59cbae3ac0"; logging-data="497270"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/zUUEHVWircKqNs+fI1AmrCGbllXzyrGo=" Cancel-Lock: sha1:vUSEglzrYVz87tiQP0nWaqS28oY= sha1:7hsa1dD75DhvmQ+iwapEiR/Kj0s= Bytes: 2328 * 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