diff options
| author | Yuchen Pei <baconp@gmail.com> | 2017-06-23 07:42:05 -0400 |
|---|---|---|
| committer | Yuchen Pei <baconp@gmail.com> | 2017-06-23 07:42:05 -0400 |
| commit | b7095e3e6e703a1bbf1d2d4f4a20f4084d472500 (patch) | |
| tree | 1bd225cc1b9e3de445e5c5997e82f5bf9d06752a | |
| parent | 863e44707e87e6a7722f412a41fff66575bbfcd2 (diff) | |
minor change
| -rw-r--r-- | Math/Combinatorics/YoungTableaux.hs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Math/Combinatorics/YoungTableaux.hs b/Math/Combinatorics/YoungTableaux.hs index baa11c0..e365ee7 100644 --- a/Math/Combinatorics/YoungTableaux.hs +++ b/Math/Combinatorics/YoungTableaux.hs @@ -9,3 +9,11 @@ isRowWord' xs ys zs = isRowWord :: Ord a => [a] -> Bool isRowWord = isRowWord' [] [] + +reduceWord :: Ord a => [a] -> [a] +reduceWord xs + | length xs <= 2 = xs + | otherwise = reduceWord' (reduceWord (init xs)) (last xs) + +reduceWord' :: Ord a => [a] -> a -> [a] +reduceWord' xs x = |
