[LispM] odd Explorer behavior - interpreted vs. compiled

Alfred M. Szmidt ams at gnu.org
Thu Oct 13 01:23:05 PDT 2016


What happens with when block tag is NIL instead of DIVP?

(DEFUN DIVP (N LIST) (BLOCK NIL (MAPCAR #'(LAMBDA (P) (COND ((ZEROP (MOD N P)) (RETURN-FROM NIL T)))) LIST) (RETURN-FROM NIL NIL)))

   > (fdefinition 'divp)
   (NAMED-LAMBDA DIVP (N LIST) (BLOCK DIVP (BLOCK NIL (MAPCAR (FUNCTION (LAMBDA (P) (COND ((ZEROP (MOD N P)) (RETURN-FROM DIVP T))))) LIST) (RETURN-FROM DIVP NIL))))

You should be able to nuke the NIL block if you are doing RETURN-FROM to DIVP.


More information about the LispM mailing list