Skip to content

Commit 02c70a5

Browse files
committed
Revert "Improve forEachExample"
This reverts commit 58552d3. because the whole point of the example was that it used forEach! Closes: #74 Thanks to Hugo Peters for reporting
1 parent 164d706 commit 02c70a5

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

bluefin-internal/src/Bluefin/Internal.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -792,7 +792,7 @@ handleCoroutine update finish f = do
792792
--
793793
-- @
794794
-- >>> runPureEff $ yieldToList $ \\y -> do
795-
-- for_ [0 .. 4] $ \\i -> do
795+
-- forEach (inFoldable [0 .. 3]) $ \\i -> do
796796
-- yield y i
797797
-- yield y (i * 10)
798798
-- ([0, 0, 1, 10, 2, 20, 3, 30], ())

bluefin-internal/src/Bluefin/Internal/Examples.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ doubleNestedForEach f =
9090

9191
forEachExample :: ([Int], ())
9292
forEachExample = runPureEff $ yieldToList $ \y -> do
93-
for_ [0 .. 4] $ \i -> do
93+
forEach (inFoldable [0 .. 4]) $ \i -> do
9494
yield y i
9595
yield y (i * 10)
9696

0 commit comments

Comments
 (0)