Browse files

Move a stray Redirectable implementation to the rest of them. He was …

…lonely.
  • Loading branch information...
1 parent ae1a75f commit 24c57d40f3e416c1c68d474d01fa997abf004280 @Raynes committed Oct 1, 2012
Showing with 15 additions and 15 deletions.
  1. +15 −15 src/conch/sh.clj
View
30 src/conch/sh.clj
@@ -22,6 +22,21 @@
(doseq [buffer (get proc k)]
(f buffer proc)))))
+(defn seqify? [options k]
+ (let [seqify (:seq options)]
+ (or (= seqify k)
+ (= seqify :out k)
+ (and (true? seqify) (= k :out)))))
+
+(extend-type nil
+ Redirectable
+ (redirect [_ options k proc]
+ (let [seqify (:seq options)
+ s (k proc)]
+ (if
+ (seqify? options k) s
+ (string/join s)))))
+
(defprotocol Drinkable
(drink [this proc]))
@@ -58,21 +73,6 @@
item)
proc))
-(defn seqify? [options k]
- (let [seqify (:seq options)]
- (or (= seqify k)
- (= seqify :out k)
- (and (true? seqify) (= k :out)))))
-
-(extend-type nil
- Redirectable
- (redirect [_ options k proc]
- (let [seqify (:seq options)
- s (k proc)]
- (if
- (seqify? options k) s
- (string/join s)))))
-
(defn add-proc-args [args options]
(if (seq options)
(apply concat args

0 comments on commit 24c57d4

Please sign in to comment.