Advertisement
Latkoski

ДекартС

Aug 17th, 2016
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lisp 0.37 KB | None | 0 0
  1. (defun dekartS (mnozA mnozB)
  2.     (rekurzija mnozA mnozA mnozB)
  3.     )
  4.  
  5. (defun rekurzija (pomosnoA mnozA mnozB)
  6.     (cond
  7.         ((null mnozB) nil)
  8.         ((null pomosnoA)(rekurzija mnozA mnozA (cdr mnozB)))
  9.         ((not(null pomosnoA))(cons (list (car mnozB)(car pomosnoA))(rekurzija (cdr pomosnoA) mnozA mnozB))
  10.         )
  11.     ))
  12.  
  13. (print (dekartS '(a b c)'(1 2)))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement