home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / lang / lisp / 3165 < prev    next >
Encoding:
Text File  |  1993-01-05  |  1.2 KB  |  39 lines

  1. Path: sparky!uunet!munnari.oz.au!spool.mu.edu!yale.edu!not-for-mail
  2. From: theodore-michael@yale.edu (Michael Theodore)
  3. Newsgroups: comp.lang.lisp
  4. Subject: Lucid Lisp complains about this code fragment
  5. Date: 4 Jan 1993 21:50:16 -0500
  6. Organization: Yale University Science & Engineering UNIX(tm), New Haven, CT 06520-2158
  7. Lines: 28
  8. Message-ID: <1iat18INNii@MINERVA.CIS.YALE.EDU>
  9. NNTP-Posting-Host: minerva.cis.yale.edu
  10.  
  11. Any thoughts on how to correct this?
  12. For some reason, what follows is no problem on Vax Lisp, nor on Macintosh
  13. Common Lisp, but when run on Lucid Lisp gets a warning :
  14. ;;Warning function tweak defined more than once 
  15.  
  16. I wouldn't care if it weren't for the fact that warning is printed to the 
  17. screen repeatedly (about 50 times).
  18.  
  19. (defun addNoiseToListOfNumbers (l)
  20.   (defun tweak (x)
  21.     (+
  22.      x
  23.      (- (* (random 1000) 0.0001) 0.05)))
  24.   (mapcar #'tweak l))
  25.  
  26. Please excuse my ignorance if this is a very obvious problem. 
  27.  
  28.     Thanks,
  29.     Michael
  30.  
  31.  
  32. (BTW, this function is from some code in a book by Mark Watson entitled
  33. "Common Lisp Modules - Artificial Intelligence in the Era of Neural Networks
  34. and Chaos Theory").
  35.  
  36. -- 
  37. Practice random acts of randomness.........
  38.         theodore-michael@cs.yale.edu
  39.