[plt-scheme] match-let bug or feature?
Welcome to MzScheme v3.99.0.8 [3m], Copyright (c) 2004-2008 PLT Scheme Inc.
> (require (lib "match.ss"))
> (match-let ([(a b) (list 1 2)]
[(b a) (list 2 1)])
(list a b))
(1 2)
> (match-let ([(a b) (list 1 2)]
[(b a) (list 3 1)])
(list a b))
match: no matching clause for ((1 2) (3 1))
=== context ===
/home/d/plt/collects/mzlib/private/match/match-error.ss:9:4: match:error
/home/d/plt/collects/scheme/private/misc.ss:63:7
I'm leaning towards "bug" because for a normal `let' you can't have
duplicate identifiers, and the scope of the duplicate identifier feature
of match patterns is restricted to individual match clauses. Though, I
can see how the way it is now could have interesting uses.
--
: Derick
----------------------------------------------------------------