Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Thinking about more complex pipes

  • Loading branch information...
commit 4c0f3093405e67efce537b1568537ff46cc5e6bf 1 parent 42b66a3
Darrick Wiebe authored
Showing with 15 additions and 0 deletions.
  1. +15 −0 src/pacer.clj
View
15 src/pacer.clj
@@ -44,3 +44,18 @@
step#
~(list step))))
steps)))
+
+(comment
+ (route g v (loop (out-e :x) in-v :max 5 :while ??))
+ (route g v (loop { max: 5 } (out-e :x) in-v))
+ (route g v (loop
+ (fn [v path loop emit] (loop) (emit path))
+ ; fn could use CPS. would that cause stack overflow?
+ ; we could cause the continuations to enqueue the elemnent and return, not actually continue
+ ; cps advantage is that I could use args to emit other things than simply the current element if I gave it args.
+ :emit-if #() ; return t/f
+ :loop-if #() ; return t/f
+ :max-depth 4 ; would not call loop-if when at max
+ :min-depth 2 ; would not emit or call emit-if
+ (out-e :x) in-v))
+ (route g v (branch { :a (v out-e) :b (v in out)} ) (merge :a :b)) )
Please sign in to comment.
Something went wrong with that request. Please try again.