Created
December 15, 2015 03:16
-
-
Save crowl/a14650c6e091cbe0b805 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;; p2.scm | |
(define codificador | |
(lambda (c e) | |
(cond | |
((null? e) '()) | |
((not (assq (car e) c)) (cons (car e) (codificador c (cdr e)))) | |
(else (cons (cdr (assq (car e) c)) (codificador c (cdr e))))))) | |
;;; Prueba | |
(define codigo (list (cons 'a 'b) (cons 'b 'i) (cons 'n 'e))) | |
(print (codificador codigo '(b a n a n a))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment