cjfrisz/core.match — Issue #1: Create patterns such that zero or more items can be matched.
Author: cjfrisz
Created: 2012-02-20 00:59:44+00:00
State: open

Currently, core.match allows for matching on one or more items thanks to Lisp-style sequence destructuring. For example, consider the following match clause:

```clojure
[([a & b] :seq)] rhs
```

This will match a sequence of one or more items, with the first bound to `a` and the rest bound to a sequence identified by `b`.

This is pretty nice, but it falls short of the niceness we get in IU Scheme Match. Specifically, consider the following match clause in IU Scheme:

```scheme
[(a* ...) rhs]
```

This will return a list matching all the elements if matching on a list (though this is pretty silly in practice). Note that this will match on the empty list, but there's no way express the same thing in clojure.core.match.

I'd be interested to see if this is possible, even if added with a more Scheme-like syntax.