(define (pattern lis1 lis2)
(cond ((null? lis1) 0)
(( = (car lis1) lis2) ( + 1 (pattern (cdr lis1) lis2)))
(else (pattern (cdr lis1) lis2))))
This is what I have so far but when I run this I receive the error "=: expects a number as 2nd argument, given 'a" when I enter (pattern '(a a) '(a a a a a a a))
Aucun commentaire:
Enregistrer un commentaire