@@ -65,7 +65,8 @@ module Streamly.Memory.Array
6565
6666 -- , defaultChunkSize
6767
68− -- * Construction
68+ -- * Arrays
69+ -- ** Construction
6970 -- | When performance matters, the fastest way to generate an array is
7071 -- 'writeN'. For regular use, 'IsList' and 'IsString' instances can be
7172 -- used to conveniently construct arrays from literal values.
@@ -86,7 +87,7 @@ module Streamly.Memory.Array
8687 -- , writeNS
8788 -- , writeS
8889
89− -- * Elimination
90+ -- ** Elimination
9091 -- 'GHC.Exts.toList' from "GHC.Exts" can be used to convert an array to a
9192 -- list.
9293
@@ -94,7 +95,7 @@ module Streamly.Memory.Array
9495 , A.read
9596 , readRev
9697
97− -- * Random Access
98+ -- ** Random Access
9899 , length
99100 -- , (!!)
100101
@@ -118,6 +119,20 @@ module Streamly.Memory.Array
118119 -- , runStreamFold
119120 , runFold
120121 -}
122+
123+ -- * Streams of Arrays
124+ -- ** Creation
125+ , AS.arraysOf
126+
127+ -- ** Elimination
128+ , AS.flatten
129+ -- , AS.concatRev
130+ , AS.unlinesBy
131+ , AS.toArray
132+
133+ -- ** Transformation
134+ , AS.splitOn
135+ , AS.compact -- compact
121136 )
122137where
123138
@@ -136,6 +151,7 @@ import Streamly.Streams.StreamK.Type (IsStream)
136151import Streamly.Fold.Types (Fold(..))
137152
138153import qualified Streamly.Memory.Array.Types as A
154+import qualified Streamly.Memory.ArrayStream as AS
139155import qualified Streamly.Streams.Prelude as P
140156import qualified Streamly.Streams.Serial as Serial
141157import qualified Streamly.Streams.StreamD as D