Harendra Kumar
Harendra Kumar
If you want to run a monad `m` function in IO monad then you will have to "run that monad" to lower it to IO and if you want to...
The minimal change required is to generate the fold using the key `k` rather than the value `a` for safety: ``` demux :: (Monad m, Ord k) => (a ->...
The initialization and cleanup happens in the same "Haskell thread", however haskell thread can be bound to a different OS thread at different times by the Haskell RTS. However it...
To be consistent with [the convention in `Data.List`](https://hackage.haskell.org/package/base-4.12.0.0/docs/Data-List.html#g:23) we should name these `mergeBy` and `mergeAsyncBy`. The `mergeWith` convention is used when the function we are using projects an element e.g....
How about: ```haskell mergeNBy cmp = Prelude.foldr (mergeWith cmp) nil ```
I know this is not optimal, we can merge pairs and then merge the results together. Something like this: ```haskell import Streamly import qualified Streamly.Prelude as S mergeN :: (IsStream...
Using `foldWith` and `mergeBy` would be suboptimal and can be terribly slow because it will merge the first two streams and then merge the result with the next stream. For...
We have mergeBy and mergeAsyncBy now, and concatPairsWith for pairwise efficient merging.
We can use bound threads and mutable ST state indexed by the thread-generation (a non-reusable, ever-increasing thread-id). Also need to make sure that FFI does not mess up with it.
See also: https://hackage.haskell.org/package/base-4.21.0.0/docs/System-IO-Unsafe.html#v:unsafePerformIO