Guest User

Untitled

a guest
Jun 24th, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. === ALL USERS PLEASE NOTE ========================
  2.  
  3. There has been some confusion concerning MAPCAR.
  4. (DEFUN MAPCAR (&FUNCTIONAL FCN &EVAL &REST LISTS)
  5. (PROG (V P LP)
  6. (SETQ P (LOCF V))
  7. L (SETQ LP LISTS)
  8. (%START-FUNCTION-CALL FCN T (LENGTH LISTS) NIL)
  9. L1 (OR LP (GO L2))
  10. (AND (NULL (CAR LP)) (RETURN V))
  11. (%PUSH (CAAR LP))
  12. (RPLACA LP (CDAR LP))
  13. (SETQ LP (CDR LP))
  14. (GO L1)
  15. L2 (%FINISH-FUNCTION-CALL FCN T (LENGTH LISTS) NIL)
  16. (SETQ LP (%POP))
  17. (RPLACD P (SETQ P (NCONS LP)))
  18. (GO L)))
  19. We hope this clears up the many questions we've had about it.
Add Comment
Please, Sign In to add comment