We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 35fa90a commit 7cbe128Copy full SHA for 7cbe128
test/Main.purs
@@ -0,0 +1,19 @@
1
+module Test.Main where
2
+
3
+import Prelude hiding (discard)
4
5
+import Control.Monad.Eff (Eff)
6
+import Control.Monad.Eff.Console (CONSOLE)
7
8
+import Data.Foldable (class Foldable)
9
+import Data.List ((..))
10
11
+import Pipes (each, for, (>->), discard)
12
+import Pipes.Core (runEffectRec, Pipe)
13
+import Pipes.Prelude as P
14
15
+runDrain :: forall e f a. Foldable f => Pipe Int a (Eff e) Unit -> f Int -> (Eff e) Unit
16
+runDrain p v = runEffectRec $ for (each v >-> p) discard
17
18
+main :: forall eff. Eff (console :: CONSOLE | eff) Unit
19
+main = runDrain (P.map (add 2)) (1..3000)
0 commit comments