meander

2022-08-24T03:30:28.941939Z

hello again friends, is it possible to do something like a list comprehension like

(m/rewrite [:a [0 1 2]]
  ???
  ???)
;; =>
[[:a 0]
 [:a 1]
 [:a 2]]
thank you!

2022-08-24T03:32:27.257389Z

oh wait this works

(m/rewrite [:a [0 1 2]]
  [?i [!o ...]]
  [[?i !o] ...])
I tried to come up with a simple example of what I’m trying to do but perhaps it was too simple

Ben Sless 2022-08-24T04:44:36.768879Z

There's actually an example in the cookbook which might apply here

Ben Sless 2022-08-24T04:45:43.802079Z

The problem is there is no control for greed (philosophical, aren't we?) So you need to qualify it yourself

šŸ˜‚ 1