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 3b25583 commit d78fa87Copy full SHA for d78fa87
core/src/Streamly/Internal/Data/Unfold.hs
@@ -71,6 +71,12 @@
71
-- unfolds allow the compiler to statically know the state and optimize it
72
-- using stream fusion whereas it is not possible with the monad bind because
73
-- the state is determined dynamically.
74
+--
75
+-- Reader:
76
77
+-- An unfold acts as a reader (see 'Reader' monad). The input to an unfold acts
78
+-- as the read-only environment. The environment can be extracted using the
79
+-- 'identity' unfold (equivalent to 'ask') and transformed using 'lmap'.
80
81
-- Open control flow style streams can also have two representations. StreamK
82
-- is a producer style representation. We can also have a consumer style
0 commit comments