Lists is imported by: TiDefault, FreeNamesBaseStruct, TiPropDecorate, FreeNamesPropStruct.

moduleLists(moduleLists,moduleList)whereimportOpTypesimportListimportProductsmergeOrd::OrdOpa->[a]->[a]->[a]merge::Orda=>[a]->[a]->[a]unionMany::Eqa=>[[a]]->[a]mapFst::(a->x)->[(a,b)]->[(x,b)]mapSnds::(b->y)->[(a, [b])]->[(a, [y])]mapFstSnds::(a->x)->(b->y)->[(a, [b])]->[(x, [y])]subset::Eqa=>[a]->[a]->Boolinfixl1|$|(|$|)::[a->b]->[a]->[b] (\\\)::Eqa=>[a]->[a]->[a] -- property srtedOrd leq xs = (m `leq` n) ==> (xs !! m) `leq` (xs !! n) -- property sorted = sortedOrd (<=) -- property noDuplEq eq xs = (xs !! m) `eq` (xs !! n) ==> m === n -- property noDupl = noDupl (==) -- property mergeOrd = sortedOrd leq xs /\ sortedOrd leq ys -- ==> sortedOrd leq (mergeOrd leq xs ys)mergeOrdleq[]ys=ysmergeOrdleqxs[]=xsmergeOrdleqa@(x:xs)b@(y:ys)|x`leq`y=x:mergeOrdleqxsb|otherwise=y:mergeOrdleqays-- property merge = mergeOrd (<=)merge=mergeOrd(<=)singleton[_]=Truesingleton_=Falsexs`subset`ys=all(`elem`ys)xsunionMany=nub.concatmapFstf=map(f><id)mapSndsg=map(id><mapg)mapFstSndsfg=map(f><mapg) (|$|)=zipWith($)xs\\\ys=filter(`notElem`ys)xs--elemBy,notElemBy :: (a->a->Bool) -> a -> [a] -> BoolelemByeqx=not.notElemByeqxnotElemByeqx=null.filter(eqx)

Index

(HTML for this module was generated on 2006-08-12. About the conversion tool.)