Guest User

Untitled

a guest
Oct 11th, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Scheme 0.37 KB | None | 0 0
  1. (define copy-lumbda
  2.         (lambda (z)
  3.                 (dmatch z
  4.                         [,sym (guard (or (symbol? sym) (number? sym))) sym]
  5.                         [(lambda (,expr),body) (append (cons 'lumbda (list (list (copy-lumbda expr)))) (cons (copy-lumbda body) '()))]
  6.                         [(,M1 ,M2) (append (list (copy-lumbda M1)) (list (copy-lumbda M2)))])))
Add Comment
Please, Sign In to add comment