Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: notesfiles Path: utzoo!watmath!clyde!burl!ulysses!harpo!ihnp4!zehntel!hplabs!hp-pcd!uoregon!uo-vax1!kentb From: kentb@uo-vax1.UUCP Newsgroups: net.emacs Subject: Parameters and recursion Message-ID: <10200002@uo-vax1.UUCP> Date: Sun, 8-Apr-84 13:08:00 EST Article-I.D.: uo-vax1.10200002 Posted: Sun Apr 8 13:08:00 1984 Date-Received: Wed, 11-Apr-84 05:29:55 EST Organization: Univ of Oregon - Eugene, OR Lines: 23 Nf-ID: #N:uo-vax1:10200002:000:546 Nf-From: uo-vax1!kentb Apr 8 10:08:00 1984 Could someone please explain the following strangeness in passing parameters to recursive mlisp functions? Here is an example: (defun (foo bar (setq bar (arg 1 "bar? ")) (message (concat "foo of " bar)) (sit-for 20) (if (> bar 0) (progn (message (concat "(- bar 1) is " (- bar 1))) (sit-for 20) (foo (- bar 1)))))) Calling foo with 4 as an argument produces the messages- foo of 4 (- bar 1) is 3 foo of -1 Help!!!! (tektronix | hp-pcd)!uoregon!uo-vax1!kentb Kent L. Beck, baffled mlisp hack...