Advertisement
Guest User

Untitled

a guest
Apr 18th, 2017
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lisp 0.29 KB | None | 0 0
  1. (defparameter m1 '((1 2 3) (4 5 6)))  
  2. (defparameter m2 '((1 0 0) (0 1 0) (0 0 1)))  
  3.  
  4.  
  5. (defun mul-matrix (a b)
  6.   (mapcar (lambda (x)
  7.             (apply #'mapcar (lambda (&rest y)
  8.                               (apply #'+ (mapcar #'* x y)))
  9.                    b))
  10.           a))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement