2. http://gist.github.com/142939
On Wed, Jul 8, 2009 at 7:19 PM, Jonas Enlund wrote:
> 1. Ok, I'll consider that.
>
> 2. Yes, I'll post a link when I have uploaded the code somewhere.
>
> 3. It has not yet arrived
>
> 4. No. I have two sources of inspiration. Pattern matching in PLT
> Scheme and
1. Ok, I'll consider that.
2. Yes, I'll post a link when I have uploaded the code somewhere.
3. It has not yet arrived
4. No. I have two sources of inspiration. Pattern matching in PLT
Scheme and this link:
http://groups.csail.mit.edu/mac/users/gjs/6.945/psets/ps05/ps.txt
(which is almost SICP
2009/7/8 Sean Devlin :
>
> Laurent,
>
> I don't quite understand your point. Could you please explain it a
> little more?
Oh, I wanted to be quick.
I think using the term "array" instead of "vector" (which is the real
term used for datastructure created by a [:a :b :c :d] form) may be
confusing
Good point. I'll be careful to use the term vector in the future, and
array for java interop only.
On Jul 8, 12:30 pm, Laurent PETIT wrote:
> 2009/7/8 Sean Devlin :
>
>
>
> > Laurent,
>
> > I don't quite understand your point. Could you please explain it a
> > little more?
>
> Oh, I wanted to
Laurent,
I don't quite understand your point. Could you please explain it a
little more?
Thanks
On Jul 8, 12:16 pm, Laurent PETIT wrote:
> 2009/7/8 Sean Devlin :
>
>
>
> > This seems like a good use for a macro. A couple of thoughts:
>
> > 1. Use arrays instead of lists
> > In clojure, it i
2009/7/8 Sean Devlin :
>
> This seems like a good use for a macro. A couple of thoughts:
>
> 1. Use arrays instead of lists
> In clojure, it is "best practice" to use arrays for data. So, your
> macro call should look like this.
>
> (match [1 2 3]
> [1 x] (+ x x)
> [1 x y] (+ x y)
4. Is this example from SICP?
On Jul 8, 12:12 pm, Sean Devlin wrote:
> This seems like a good use for a macro. A couple of thoughts:
>
> 1. Use arrays instead of lists
> In clojure, it is "best practice" to use arrays for data. So, your
> macro call should look like this.
>
> (match [1 2 3]
This seems like a good use for a macro. A couple of thoughts:
1. Use arrays instead of lists
In clojure, it is "best practice" to use arrays for data. So, your
macro call should look like this.
(match [1 2 3]
[1 x] (+ x x)
[1 x y] (+ x y))
2. Could you post the source to mat
Hi.
I'm developing a simple pattern matching library for clojure but I am
having
trouble with macros (which I have almost zero experience with).
I have a function `make-matcher`
(make-matcher )
which returns a function that can pattern match on data and returns a
map of bindings (or nil in cas