Guest User

Untitled

a guest
Mar 14th, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lisp 0.77 KB | None | 0 0
  1.  
  2. (declaim (optimize  (compilation-speed 0)))
  3.  
  4. (defun my5 ()
  5.   (declare (optimize (speed 3) (space 0) (safety 0) (debug 0)))
  6.   (loop for num from  1
  7.      until (loop for divisor from 20 downto 1
  8.           always (zerop (mod (the fixnum num)
  9.                  (the fixnum divisor))))
  10.      finally (return num)))
  11.  
  12. Why do I get:
  13.  note: doing signed word to integer coercion (cost 20) to NUM
  14.  
  15. ; in: DEFUN MY5
  16. ;     (LOOP FOR NUM FROM (THE WORD 1)
  17. ;           UNTIL (LOOP FOR DIVISOR FROM 20 DOWNTO 1
  18. ;                       ALWAYS (ZEROP (MOD (THE FIXNUM NUM) (THE FIXNUM DIVISOR))))
  19. ;           FINALLY (RETURN NUM))
  20. ; --> BLOCK LET SB-LOOP::LOOP-BODY TAGBODY SB-LOOP::LOOP-REALLY-DESETQ
  21. ; ==>
  22. ;   (SETQ NUM (1+ NUM))
  23. ;
  24. ; note: w
  25. ;
  26. ; compilation unit finished
  27. ;   printed 1 note
Add Comment
Please, Sign In to add comment