Path: utzoo!mnetor!tmsoft!torsqnt!lethe!yunexus!ists!helios.physics.utoronto.ca!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!news.cs.indiana.edu!ariel.unm.edu!nmsu!opus!owhite From: owhite@nmsu.edu (smouldering dog) Newsgroups: comp.lang.lisp Subject: lost soul needs help with trivial code. Message-ID: Date: 19 Feb 91 16:19:07 GMT Sender: news@NMSU.Edu Distribution: comp Organization: Computing Research Lab Lines: 29 hi I am new to lisp and I think it is incredibly useful for the work I have been doing in DNA analysis. I can't get this little hack to work. I sincerely would like to understand what is goin wrong and I sincerely need someone's help: make-length-list gets a cons-list like ((100 200) (300 400) (455 526)) and I just want it to return a cons-list (100 100 71). (defun make-length-list(coord) (let ((first (car coord)) (this ()) (n1 0) (n2 0)) (if coord (progn (while coord (let ((first (car coord)) (setq n1 (car coord)) (setq n2 (car (cdr coord)))) (cons (- n2 n1) this)) (setq coord (cdr coord))))))) -- owen white (owhite@nmsu.edu) -=-*-=-=-*-=-=-*-=-=-*-=-=-*-=-=-*-=-=-*-=-=-*-=-=-*-=-=-*-=-=-*-=-*-=-=-*-=- got my head on a pole (for better reception) -=-*-=-=-*-=-=-*-=-=-*-=-=-*-=-=-*-=-=-*-=-=-*-=-=-*-=-=-*-=-=-*-=-*-=-=-*-=-