[racket] Which match macro is correct?

From: Niitsuma Hirotaka (hirotaka.niitsuma at gmail.com)
Date: Tue Oct 11 23:23:37 EDT 2011

on Gauche

work
------------
(use srfi-1)
(use util.match)
(match '(0 (1 2) (3 4 5))
  [(a (b c) (d e f))
   (list a b c d e f)]) ;;note this case

(match '(0 (1 2) (3 4 5))
 [`(,a (,b ,c) (,d ,e ,f))
   (list a b c d e f)])
------------

on Racket

Err
------------
#lang scheme
 (require racket/match)
(match '(0 (1 2) (3 4 5))
  [(a (b c) (d e f))
   (list a b c d e f)])
;=> match: syntax error in pattern in: (a (b c) (d e f)) ;;compare to gouche
------------

Ok
------------
#lang scheme
 (require racket/match)
(match '(0 (1 2) (3 4 5))
  [(list a (list b c) (list d e f))
   (list a b c d e f)])

(match '(0 (1 2) (3 4 5))
 [`(,a (,b ,c) (,d ,e ,f))
   (list a b c d e f)])
------------


Posted on the users mailing list.