@@ -100,12 +100,6 @@ module Streamly.Internal.Data.Array.Foreign
100 -- , findIndex
100 -- , findIndex
101 -- , findIndices
101 -- , findIndices
103− -- -- * In-pace mutation (for Mutable Array type)
109 , unsafeSlice
103 , unsafeSlice
111 -- * Immutable Transformations
105 -- * Immutable Transformations
@@ -370,49 +364,8 @@ splitAt i arr = undefined
370splice :: Array a -> Array a -> Array a
364splice :: Array a -> Array a -> Array a
371splice arr1 arr2 = undefined
365splice arr1 arr2 = undefined
373−-------------------------------------------------------------------------------
374−-- In-place mutation APIs
375−-------------------------------------------------------------------------------
377−-- | Partition an array into two halves using a partitioning predicate. The
378−-- first half retains values where the predicate is 'False' and the second half
379−-- retains values where the predicate is 'True'.
380−{-# INLINE partitionBy #-}
381−partitionBy :: (a -> Bool) -> Array a -> (Array a, Array a)
382−partitionBy f arr = undefined
384−-- | Shuffle corresponding elements from two arrays using a shuffle function.
385−-- If the shuffle function returns 'False' then do nothing otherwise swap the
386−-- elements. This can be used in a bottom up fold to shuffle or reorder the
388−shuffleBy :: (a -> a -> m Bool) -> Array a -> Array a -> m (Array a)
389−shuffleBy f arr1 arr2 = undefined
391−-- XXX we can also make the folds partial by stopping at a certain level.
393−-- | Perform a top down hierarchical recursive partitioning fold of items in
394−-- the container using the given function as the partition function.
396−-- This will perform a quick sort if the partition function is
397−-- 'partitionBy (< pivot)'.
400−{-# INLINABLE foldtWith #-}
401−foldtWith :: Int -> (Array a -> Array a -> m (Array a)) -> Array a -> m (Array a)
402−foldtWith level f = undefined
404−-- | Perform a pairwise bottom up fold recursively merging the pairs. Level
405−-- indicates the level in the tree where the fold would stop.
407−-- This will perform a random shuffle if the shuffle function is random.
408−-- If we stop at level 0 and repeatedly apply the function then we can do a
410−foldbWith :: Int -> (Array a -> Array a -> m (Array a)) -> Array a -> m (Array a)
411−foldbWith level f = undefined
414−-- XXX consider the bulk update/accumulation/permutation APIs from vector.
416-------------------------------------------------------------------------------
369-------------------------------------------------------------------------------
417-- Random reads and writes
370-- Random reads and writes
418-------------------------------------------------------------------------------
371-------------------------------------------------------------------------------