// $Id$ $module "refal.plus.List"; $func Id e1 = e1; $func Append (e1) e2 = e2e1; $func Zip (e.list1) (e.list2) = e.new_list; $func? Map s.Fname e.Fargs (e.list) = e.new_list; $func? MapIn s.Fname e.Fargs (e.list) = e.new_list; $func Filter s.Fname e.Fargs (e.list) = e.new_list; $func Split s.Fname e.Fargs (e.list) = (e.true_list) (e.false_list); $func? IsElem e.list t.item = ; $func Foldr s.Fname e.Fargs (e.value) (e.list) = e.value; $func Foldr1 s.Fname e.Fargs (e.list) = e.value; $func? All s.Fname e.Fargs (e.list) = ; $func? Any s.Fname e.Fargs (e.list) = ; $func Concat e.lists = e.list; $func Paren exprs = e.lists; $func Reverse e.list = e.rev_list; $func Intersperse (e.sep) e.list = e.new_list; $func Separate (e.sep) e.list = e.list_of_lists; $func Nub e.expr = e.selected; $func Replicate s.n e.expr = e.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.or; // Choose from the first list all elements present in the second one. $func And (e.list1) e.list2 = e.and; // Choose from the first list all elements not present in the second one. $func Sub (e.list1) e.list2 = e.not;