2-- Module : Streamly.Data.StreamK
3-- Copyright : (c) 2017 Composewell Technologies
6-- Maintainer : streamly@composewell.com
10-- Streams using Continuation Passing Style (CPS). See notes in "Data.Stream"
11-- module to know when to use this module.
13-- 'StreamK' operations have more overhead than 'Stream' operations, however,
14-- 'Stream' operations fuse only when the pipeline is statically composed, is
15-- not too large, and does not involve recursion. For such cases, a typical
16-- example is creating a large or infinite stream by appending, 'StreamK'
19-- You can use operations from "Streamly.Data.Stream" for StreamK as well by
20-- converting StreamK to Stream, and vice-versa. Most of the time converting to
21-- 'Stream' is better than using native StreamK operations, however in certain
22-- cases using native StreamK operations may work better. Using 'Stream'
23-- operations are especially when multiple contiguous operations can fuse
26-- There are no native exception handling operations in the StreamK module,
27-- please use 'toStream' to convert to 'Stream' type and use exception
28-- handling operations from "Streamly.Data.Stream".
30-- See "Streamly.Internal.Data.Stream.StreamK" for more native StreamK
33-- primitive/open loop operations that can be used recursively e.g. uncons,
34-- foldBreak, parseBreak should not be converted from StreamD for use in
35-- StreamK, instead native StreamK impl should be used.
37-- Closed loop operations like repeat, replicate, iterate etc can be converted
40-- In the last phase any operation like (toStreamK . f . toStreamD) should be
41-- rewritten to a K version of f.
42-- XXX Need to add rewrite rules for all missing StreamD operations.
44module Streamly.Data.StreamK
85 -- * Combining Two Streams
101 -- XXX is "bind/concatFor" better to have than crossWith?
102 -- crossWith f xs1 xs2 = concatFor xs1 (\x -> fmap (f x) xs2)
106 -- , CrossStreamK (..)
108 -- * Stream of streams
114 -- * Buffered Operations
120import Streamly.Internal.Data.Stream.StreamK
121import Prelude hiding (reverse, zipWith, mapM, dropWhile, take)
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list