@@ -100,12 +100,6 @@ module Streamly.Internal.Data.Array.Foreign
100100 -- , findIndex
101101 -- , findIndices
102102
103− -- -- * In-pace mutation (for Mutable Array type)
104− -- , partitionBy
105− -- , shuffleBy
106− -- , foldtWith
107− -- , foldbWith
108−
109103 , unsafeSlice
110104
111105 -- * Immutable Transformations
@@ -370,49 +364,8 @@ splitAt i arr = undefined
370364splice :: Array a -> Array a -> Array a
371365splice arr1 arr2 = undefined
372366
373−-------------------------------------------------------------------------------
374−-- In-place mutation APIs
375−-------------------------------------------------------------------------------
376−
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
383−
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
387−-- elements.
388−shuffleBy :: (a -> a -> m Bool) -> Array a -> Array a -> m (Array a)
389−shuffleBy f arr1 arr2 = undefined
390−
391−-- XXX we can also make the folds partial by stopping at a certain level.
392−--
393−-- | Perform a top down hierarchical recursive partitioning fold of items in
394−-- the container using the given function as the partition function.
395−--
396−-- This will perform a quick sort if the partition function is
397−-- 'partitionBy (< pivot)'.
398−--
399−-- @since 0.7.0
400−{-# INLINABLE foldtWith #-}
401−foldtWith :: Int -> (Array a -> Array a -> m (Array a)) -> Array a -> m (Array a)
402−foldtWith level f = undefined
403−
404−-- | Perform a pairwise bottom up fold recursively merging the pairs. Level
405−-- indicates the level in the tree where the fold would stop.
406−--
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
409−-- bubble sort.
410−foldbWith :: Int -> (Array a -> Array a -> m (Array a)) -> Array a -> m (Array a)
411−foldbWith level f = undefined
412367-}
413368
414−-- XXX consider the bulk update/accumulation/permutation APIs from vector.
415−
416369-------------------------------------------------------------------------------
417370-- Random reads and writes
418371-------------------------------------------------------------------------------