PasteRack.org
Paste # 64882
2017-10-11 01:11:16

Fork as a new paste.

Paste viewed 82 times.


Embed:

Bad Matching

#lang racket

(define (mm e)
    (match e
      [`(let ([,xs ,es] ...) ,body ...) body]
      [_ 'else]))


(mm '(let ([a 1]) a a); ==> returns '(a a). good!
(mm '(let ([a 1]) a); ==> returns '(a), can i make it return 'a ?