Copyright | (c) OleksandrZhabenko 2020 |
---|---|
License | MIT |
Stability | Experimental |
Safe Haskell | None |
Language | Haskell2010 |
Maintainer : olexandr543@yahoo.com
Generalization of the DobutokO.Poetry.StrictV module functionality from
the dobutokO-poetry-general
package.
Can be used to get possible permutations of no more than 7 sublists
in the list separated with the elements of the "whitespace symbols"
list.
Synopsis
- uniquenessVariants2GN :: (Eq a, Ord b) => [a] -> Vector ([b] -> b) -> ([a] -> Vector c) -> (Vector c -> [b]) -> [a] -> Vector ([b], Vector b, [a])
- uniquenessVariants2GNP :: (Eq a, Ord b) => [a] -> [a] -> [a] -> Vector ([b] -> b) -> ([a] -> Vector c) -> (Vector c -> [b]) -> [a] -> Vector ([b], Vector b, [a])
- sublistsG :: Eq a => [a] -> [a] -> [[a]]
- preAppend :: [a] -> [[a]] -> [[a]] -> [[a]]
Documentation
uniquenessVariants2GN :: (Eq a, Ord b) => [a] -> Vector ([b] -> b) -> ([a] -> Vector c) -> (Vector c -> [b]) -> [a] -> Vector ([b], Vector b, [a]) Source #
Given a [a] consisting of no more than 7 sublists interspersed with the elements of the first argument,
it returns a Vector
of possible combinations without repeating of the sublists in different order and for each of them appends also
the information about generalized "uniqueness periods" (see uniqueness-periods-vector
package) to it and finds out
some different metrics -- named "norms".
Afterwards, depending on these norms some (usually phonetic for the words) properties of the sublists can be specified that allow to use them for special cases of repetitions (usually, for the words -- poetically or to create a varied melody with them).
uniquenessVariants2GNP :: (Eq a, Ord b) => [a] -> [a] -> [a] -> Vector ([b] -> b) -> ([a] -> Vector c) -> (Vector c -> [b]) -> [a] -> Vector ([b], Vector b, [a]) Source #
Generalized variant of uniquenessVariants2GN
with prepending and appending [a]
(given as the first and the second argument).