File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 6868 ['_ (PWild)]
6969 [(? symbol?) (PVar p)]
7070 [(? string?) (PStr p)]
71- [(list 'quote s) (PSymb s)]
71+ [(list 'quote (? symbol? s))
72+ (PSymb s)]
7273 [(list 'quote (list))
7374 (PLit '() )]
7475 [(list 'box p)
Original file line number Diff line number Diff line change 314314 (check-equal? (run '(match 'foo ['foo #t ] [_ #f ])) #t )
315315 (check-equal? (run '(match "foo " ["foo " #t ] [_ #f ])) #t )
316316 (check-equal? (run '(match "foo " ["bar " #t ] [_ #f ])) #f )
317+ (check-equal? (run '(match (cons '+ (cons 1 (cons 2 '() )))
318+ [(cons '+ (cons x (cons y '() )))
319+ (+ x y)]))
320+ 3 ))
317321
318322 ;; Mountebank examples
319323 (check-equal? (run '#())
Original file line number Diff line number Diff line change 7272 ['_ (PWild)]
7373 [(? symbol?) (PVar p)]
7474 [(? string?) (PStr p)]
75- [(list 'quote s) (PSymb s)]
75+ [(list 'quote (? symbol? s))
76+ (PSymb s)]
7677 [(list 'quote (list))
7778 (PLit '() )]
7879 [(list 'box p)
Original file line number Diff line number Diff line change 313313 (check-equal? (run '(match 'foo ['bar #t ] [_ #f ])) #f )
314314 (check-equal? (run '(match 'foo ['foo #t ] [_ #f ])) #t )
315315 (check-equal? (run '(match "foo " ["foo " #t ] [_ #f ])) #t )
316- (check-equal? (run '(match "foo " ["bar " #t ] [_ #f ])) #f ))
316+ (check-equal? (run '(match "foo " ["bar " #t ] [_ #f ])) #f )
317+ (check-equal? (run '(match (cons '+ (cons 1 (cons 2 '() )))
318+ [(cons '+ (cons x (cons y '() )))
319+ (+ x y)]))
320+ 3 ))
317321
318322(define (test-runner-io run)
319323 ;; Evildoer examples
You can’t perform that action at this time.
0 commit comments