| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
Howl.Util
Description
Small utility helpers used across the implementation.
Documentation
splitsK :: Seq a -> (Seq a -> Seq a -> r -> r) -> r -> r #
Stream splits of xs into (t1,t2) where xs == t1++t2. Calls the step function once per split; allows early exit.
splits1K :: Seq a -> (Seq a -> a -> Seq a -> r -> r) -> r -> r #
Stream splits of xs into (t1, t, t2) where xs == t1++[t]++t2. Calls the step function once per split; allows early exit.
subSequencesK :: Seq a -> (Seq a -> Seq a -> r -> r) -> r -> r #
Stream all (subSeq,rest) pairs where subSeq is a subsequence of xs. Enumerates in increasing order of subsequence length. For long sequences, only subsequences up to a small size are generated.