Fork me on GitHub
#meander
<
2020-03-05
>
timothypratley05:03:07

((s/rewrite
   (m/with [%resource {:methods   (m/seqable [_ !methods] ...)
                       :resources (m/seqable [_ %resource] ...)}]
     %resource)
   ;;>
   ~!methods)
 {:methods {:c "z"}
  :resources {:methods {:a "method1"}
              :resources {:methods {:b "method2"}}}})
=> ["z" "method2"]

timothypratley05:03:17

doesn’t seem quite right?

timothypratley05:03:03

I expected “method1” to get collected.

timothypratley07:03:53

(m/rewrite
  {:m {1 2}
   :r {:m {3 4}
       :r {:m {5 6}
           :r {:m {7 8}
               :r {:m {9 10}}}}}}
  (m/with [%r {:m   !m
               :r (m/seqable [_ %r] ...)}]
    %r)
  ;;>
  ~!m)
=> [{1 2} nil {5 6} nil {9 10}]

timothypratley07:03:03

what in the world?

timothypratley19:03:15

Thank you 🙂 facepalm Hahaha I can’t believe I messed that up but thanks for setting me right 🙂

grounded_sage10:03:02

(r/pipe !begin-time (format-time "hhmm")) I just tried this but it doesn’t seem to work. (m/app (format-time "hhmm") !begin-time) This is what I have at the moment. Using a HOF

jimmy15:03:44

pipe doesn't do what you are thinking it does here. app would I think be the right answer.