diff options
| author | bringert <unknown> | 2005-09-22 15:56:05 +0000 |
|---|---|---|
| committer | bringert <unknown> | 2005-09-22 15:56:05 +0000 |
| commit | 9bb01bfc3892f545162806e88daf9a0d6c28c8f7 (patch) | |
| tree | eb344e45478647d065475c3e8f21e8871f5ba0d7 /src/GF/Data | |
| parent | eace8bcd68e12c71d8d9294ae935ad639d01d1fa (diff) | |
Generated finite state networks are now state minimal.
Diffstat (limited to 'src/GF/Data')
| -rw-r--r-- | src/GF/Data/Utilities.hs | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/GF/Data/Utilities.hs b/src/GF/Data/Utilities.hs index 7bc5040fd..fbe6c6a27 100644 --- a/src/GF/Data/Utilities.hs +++ b/src/GF/Data/Utilities.hs @@ -4,9 +4,9 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/09/14 18:00:19 $ +-- > CVS $Date: 2005/09/22 16:56:05 $ -- > CVS $Author: bringert $ --- > CVS $Revision: 1.4 $ +-- > CVS $Revision: 1.5 $ -- -- Basic functions not in the standard libraries ----------------------------------------------------------------------------- @@ -80,11 +80,15 @@ sortNub = map head . group . sort unionAll :: Eq a => [[a]] -> [a] unionAll = nub . concat --- | Like lookup, but fails if the argument is not found, +-- | Like 'lookup', but fails if the argument is not found, -- instead of returning Nothing. lookup' :: Eq a => a -> [(a,b)] -> b lookup' x = fromJust . lookup x +-- | Like 'find', but fails if nothing is found. +find' :: (a -> Bool) -> [a] -> a +find' p = fromJust . find p + -- * ordering functions compareBy :: Ord b => (a -> b) -> a -> a -> Ordering |
