// $Id$ $module "refal.plus.List"; $func Id e.expr = e.expr; $func Append (e.expr1) e.expr2 = e.expr2expr1; $func Ints s.start s.end = e.list; $func? EqTerms t1 t2 = ; $func CompareTerms t1 t2 = s.Lt_or_Eq_or_Gt; $func Zip (e.list1) (e.list2) = e.list; $func Unzip e.list = (e.list1) (e.list2); $func? Map s.func e.funcArgs (e.list) = e.list; $func? MapIn s.func e.funcArgs (e.list) = e.list; $func Filter s.func e.funcArgs (e.list) = e.list; $func Split s.func e.funcArgs (e.list) = (e.trueList) (e.falseList); $func? IsElem e.list t.item = ; $func Foldr s.func e.funcArgs (e.value) (e.list) = e.value; $func Foldr1 s.func e.funcArgs (e.list) = e.value; $func? All s.func e.funcArgs (e.list) = ; $func? Any s.func e.funcArgs (e.list) = ; $func Concat e.lists = e.list; $func Paren e.exprs = e.lists; $func Reverse e.list = e.list; $func Intersperse (e.sep) e.list = e.list; $func Separate (e.sep) e.list = e.listOfLists; $func Nub e.list = e.list; $func NubBy s.eqTerms e.list = e.list; $func Replicate s.n e.expr = e.list; $func QSort e.list = e.sorted_list; $func SortBy s.cmpTerms e.list = e.sorted_list; $func Sort e.list = e.sorted_list; // Returns number of e.expr entries in e.source and e.source without all e.expr's. // FIXME: Strange function! // Additionally it conflicts with Table.Entries. // Commented out at least until there is some sort of name conflicts resolution // strategy. // $func Entries e.expr (e.source) = s.num e.res; // Add to the first list all new elements from the second one. $func Or (e.list1) e.list2 = e.list; // Choose from the first list all elements present in the second one. $func And (e.list1) e.list2 = e.list; // Choose from the first list all elements not present in the second one. $func Sub (e.list1) e.list2 = e.list;