[ANN] A pre-release of the Scribble syntax in Clojure

2013-09-20 Thread Bogdan Opanchuk
Hello all, There was a thread a while ago with me asking about the ways to modify the S-expression syntax in Clojure as it's done in Scribble. Long story short, I'm happy to announce a working (well, to my current knowledge) implementation: on

Re: A library function for the repeated application of a lambda with values from a sequence

2013-09-14 Thread Bogdan Opanchuk
Hi Cedric, Thanks, I'm feeling really silly now... I should have thought about folds the first second after encountering this :) -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note t

A library function for the repeated application of a lambda with values from a sequence

2013-09-14 Thread Bogdan Opanchuk
Hello, Consider the following problem: (def v [1 2 3]) (def l '(4 5 6)) ; we need to apply in sequence ; `v <- (func v e)`, ; where `e` goes over elements of the list `l` (def new-v (apply-from-list func v l)) For example, if `(def func conj)`, then the value of `new-v` is `[1 2 3 4 5 6]`. I

Re: Implementing a Scribble-like preprocessor for Clojure

2013-09-07 Thread Bogdan Opanchuk
For what it's worth, I've finished a draft implementation using reader API utilities from Clarity . The result can be seen on github , the example of syntax in tests

Re: Implementing a Scribble-like preprocessor for Clojure

2013-08-24 Thread Bogdan Opanchuk
PM UTC+10, JeremyS wrote: > > Hi Bogdan, > > That's a cool Idea ! I'm wondering if you wouldn't be better off with > something like Instaparse <https://github.com/Engelberg/instaparse>. > > Cheers, > > Jeremys. > > On Friday, August 23, 2013

Implementing a Scribble-like preprocessor for Clojure

2013-08-23 Thread Bogdan Opanchuk
Hi all, For those who are not familiar with Scribble, it is basically a preprocessor for Racket (a dialect of Lisp) which makes its syntax more concise when working with lots of text, effectively turning it into a template engine (see http://docs.racket-lang.org/scribble/reader.html for detail