Returns a subsequence of the first stream, deleting first occurrences
of those elements that are present in the second stream. Note that
this is not a commutative operation. This is similar to the
deleteFirstsBy.
>>> f xs ys = Stream.fold Fold.toList $ Stream.deleteFirstsBy (==) (Stream.fromList xs) (Stream.fromList ys)
>>> f [1,2,2,3,3,5] [1,2,2,3,4]
[3,5]
The following holds:
deleteFirstsBy (==) (Stream.ordNub s2 `append` s1) s2 === s1
deleteFirstsBy (==) (Stream.ordNub s2 `interleave` s1) s2 === s1
First stream can be infinite, second stream must be finite.
Space: O(m) where
m is the number of elements in the first
stream.
Time: O(m x n) where
m is the number of elements in the first
stream and
n is the number of elements in the second stream.
Pre-release