Re: Search seqs in seqs

2014-06-08 Thread Ulrich Küttler
>>> more)))] >>> (or (step coll) ( >>> >>> => (partition-by-seq [:b :c] []) >>> >>> () >>> >>> => (partition-by-seq [:b :c] [:a :d]) >>> >>> ((:a :d)) >>> >>> => (partiti

Search seqs in seqs

2014-06-03 Thread Ulrich Küttler
Hi, what is the preferred way to find sub-seqs in a seq? I am trying to convert [:a :b :c :d :a :b :c :d :a :b :c] into ((:a) (:b :c) (:a :d) (:b :c) (:a)) using the sub-seq (:b :c) instead of positions. partition, partition-by and the like all look at one element at a time. What I need is a

Re: Lazy sequence transformation with item merge

2012-01-17 Thread Ulrich Küttler
Thank you for these solutions. You helped me a lot to get a tiny bit of clojure. This is indeed a different way to think about problems. At least it feels different to me. On Mon, Jan 16, 2012 at 11:49 PM, Meikel Brandmeyer wrote: > Hi, > > here another, slightly different, although in the core s

Lazy sequence transformation with item merge

2012-01-16 Thread Ulrich Küttler
Hi all, I am looking for a function that gives me a lazy sequence from a simple key, value file. Keys are words at the beginning of a line. Value start after a key and can span multiple lines. Thus, a file looks something like: key1 = value1 is there and continues key2 = new value key3 = value3 t