/* Regdb Utilities - DMS - nov 98 - by Patrice FAVRE */ /*-----------------------*/ fun SuppMot(mot,lstmot)= if lstmot == nil then 0 else ( let hd lstmot -> cib in if !strcmp mot cib then mutate lstmot <- [ hd tl lstmot tl tl lstmot ] else nil; SuppMot mot tl lstmot );; /*-----------------------*/ fun SuppMotLig(mot,lstlig)= if lstlig == nil then 0 else ( let hd lstlig -> lig in ( SuppMot mot lig; if (hd lig) == nil then mutate lstlig <- [ hd tl lstlig tl tl lstlig ] else nil ); SuppMotLig mot tl lstlig );; /*-----------------------*/ fun TraitDblMot(lig,lstlig)= if lig == nil then 0 else ( let hd lig -> mot in SuppMotLig mot (tl lig)::lstlig; TraitDblMot tl lig lstlig );; /*-----------------------*/ fun TraitDblLig(lstlig)= if lstlig == nil then 0 else ( TraitDblMot hd lstlig tl lstlig; TraitDblLig tl lstlig );; /*-----------------------*/ fun TraitLgMot(lstmot,lg)= if lstmot == nil then nil else let hd lstmot -> mot in if (strlen mot) > lg then mot else TraitLgMot tl lstmot lg;; /*-----------------------*/ fun TraitLgLig(lstlig,lg)= if lstlig == nil then nil else let TraitLgMot hd lstlig lg -> res in if res != nil then res else TraitLgLig tl lstlig lg;;