diff --git a/simple-pipe.cabal b/simple-pipe.cabal
--- a/simple-pipe.cabal
+++ b/simple-pipe.cabal
@@ -2,7 +2,7 @@
 cabal-version:	>= 1.8
 
 name:		simple-pipe
-version:	0.0.0.18
+version:	0.0.0.19
 stability:	Experimental
 author:		Yoshikuni Jujo <PAF01143@nifty.ne.jp>
 maintainer:	Yoshikuni Jujo <PAF01143@nifty.ne.jp>
@@ -80,12 +80,12 @@
 source-repository	this
     type:	git
     location:	git://github.com/YoshikuniJujo/simple-pipe.git
-    tag:	simple-pipe-0.0.0.18
+    tag:	simple-pipe-0.0.0.19
 
 library
     hs-source-dirs:	src
     exposed-modules:
-        Data.Pipe,
+        Data.Pipe, Data.Pipe.Flow,
         Data.Pipe.List, Data.Pipe.IO, Data.Pipe.ByteString
     build-depends:
         base == 4.*, monad-control == 0.3.*, lifted-base == 0.2.*,
diff --git a/src/Data/Pipe/Flow.hs b/src/Data/Pipe/Flow.hs
new file mode 100644
--- /dev/null
+++ b/src/Data/Pipe/Flow.hs
@@ -0,0 +1,12 @@
+module Data.Pipe.Flow (before, until) where
+
+import Prelude hiding (until)
+import Data.Pipe
+
+before :: (PipeClass p, Monad m, Monad (p a a m)) => (a -> Bool) -> p a a m ()
+before p = (await >>=) . maybe (return ()) $ \x ->
+	if p x then return () else yield x >> before p
+
+until :: (PipeClass p, Monad m, Monad (p a a m)) => (a -> Bool) -> p a a m ()
+until p = (await >>=) . maybe (return ()) $ \x ->
+	if p x then yield x else yield x >> before p
