It's worth noting that the -> and ->> macros are just that: macros. They have lexical extent and are expanded at compile time.
Factjor is (essentially) interpreted, but can be used in interesting higher order ways. For example, you can write functions that return lazy sequences of Factjor instructions. The idea of sequences-as-concatenative-programs, called "quotations", is best explored by downloading Factor and tinkering with the (excellent!) environment & live/interactive docs: http://factorcode.org/ When I presented Factjor at Clojure/West a while back, quite a few people mentioned to me that they were reminded of the threading macros. I never attempted to do this, but in theory it wouldn't be too hard to create a macro that does (naive) partial evaluation of concatenative code at expansion time! If you attempt it, I'd love to see what you come up with :-) On Saturday, January 18, 2014 7:01:52 PM UTC-5, Nicola Mometto wrote: > > I don't know if that's what you're asking for, but there's > https://github.com/brandonbloom/factjor > > t x writes: > > > Hi, > > > > Despite the title and content of this email, this is a serious, non > > joking (i.e. brainfuck) question. > > > > After studying > > https://github.com/rplevy/swiss-arrows/blob/master/src/swiss/arrows.cljfor > > a bit, it hit me: > > > > -> and ->> are special cases of forth machines, where there is a stack, > > which always has exactly one item. > > > > Thus, when we have something like > > (-> init > > instr1 > > instr2 > > ... instr k ... ) > > > > what happens is that "init" is pushed onto the stack, then for each $i$, > we > > pop the top item off the stack, pass it to (instr i), then push the > value > > back on the stack. > > > > > > Now, if take a few steps back and squint, we ask: why is it that we only > > have one item on the stack? why not multiple items on the stack -- and > now, > > suddenly, we are approaching forth. > > > > Thus, in a completely serious question -- is there any clojure > > threading-macro DSL basically provides a forth-like? > > > > -- > -- -- 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 that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.