Re: Redefining the notion of S-EXP, and pattern matching S-EXPs in clojure

2014-01-20 Thread Alan Moore
Take a look at clara-rules by Ryan Brush: https://github.com/rbrush/clara-rules Clara pattern matches in the RETE tradition but works very well with Clojure records and maps (and Java objects.) Depending on how you expose/insert your data into the working memory will make it easier or harder t

Re: Redefining the notion of S-EXP, and pattern matching S-EXPs in clojure

2014-01-20 Thread Alex Miller
core.match can do some of this. https://github.com/clojure/core.match data.zip has some extensions beyond zip that are useful (although a lot of what's there is cast in terms of xml-handling uses): https://github.com/clojure/data.zip I have rolled variants of this a few times, mostly using zipp

Re: Redefining the notion of S-EXP, and pattern matching S-EXPs in clojure

2014-01-19 Thread Dom Kiva-Meyer
I'm not sure if this is what you're looking for, but seqex ( https://github.com/jclaggett/seqex) might be of use. On Sun, Jan 19, 2014 at 9:40 AM, Dave Tenny wrote: > As I try to reconcile my ancient past in writing common lisp code with a > clojure learning exercise, > I wonder whether clojure

Re: Redefining the notion of S-EXP, and pattern matching S-EXPs in clojure

2014-01-19 Thread Jozef Wagner
s-expression is a notation, with which nested lists can be represented in a textual form. In any lisp language, your code is not working with s-expressions, but with a data structure, which is most likely a cons. s-expressions provide a convenient textual representation from which you can *read* o