Fork me on GitHub
#meander
<
2022-08-24
>
nonrecursive03:08:28

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!

nonrecursive03:08:27

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 Sless04:08:36

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

Ben Sless04:08:43

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

😂 1