1
0
forked from GitHub/gf-core

Started wotking on NFA to DFA.

This commit is contained in:
bringert
2005-09-14 17:00:19 +00:00
parent 247af471aa
commit efaafffb77
2 changed files with 56 additions and 26 deletions

View File

@@ -4,9 +4,9 @@
-- Stability : (stable)
-- Portability : (portable)
--
-- > CVS $Date: 2005/09/14 15:17:29 $
-- > CVS $Date: 2005/09/14 18:00:19 $
-- > CVS $Author: bringert $
-- > CVS $Revision: 1.3 $
-- > CVS $Revision: 1.4 $
--
-- Basic functions not in the standard libraries
-----------------------------------------------------------------------------
@@ -85,6 +85,14 @@ unionAll = nub . concat
lookup' :: Eq a => a -> [(a,b)] -> b
lookup' x = fromJust . lookup x
-- * ordering functions
compareBy :: Ord b => (a -> b) -> a -> a -> Ordering
compareBy f = both f compare
both :: (a -> b) -> (b -> b -> c) -> a -> a -> c
both f g x y = g (f x) (f y)
-- * functions on pairs
mapFst :: (a -> a') -> (a, b) -> (a', b)