[plt-scheme] ocaml-style match

From: Jon Rafkind (rafkind at cs.utah.edu)
Date: Mon Apr 5 17:09:21 EDT 2010

Here is `list-match' which gives you ocaml-style matching.

(list-match '(1 2 3 4)
   [(a :: b :: c) (and
                    (equal? a 1)
                    (equal? b 2)
                    (equal? c '(3 4)))])

More examples in the implementation.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ls.ss
URL: <http://lists.racket-lang.org/users/archive/attachments/20100405/13fe1851/attachment.ksh>

Posted on the users mailing list.