%0 Table {at.Relation Any Any Any;concat.Relation Any Any Any;each.Relation Any (Relation Any Any) Any;eachIndex.Relation Functor Any Any Functor;every.Relation Functor (Relation Any);filter.Relation Functor (Relation Any) Functor;find.Relation Any Any Number;findOnce.Relation Any Any Number;first.Relation Any Any;fold.Relation Functor Any Any Any;forall.Relation Functor (Relation Any);has.Relation Any Any;has2.Relation Any Any;iterate.Relation Any Number Any Any;join.Relation Any String String;last.Relation Any Any;length.Relation Any Any;map.Relation Functor (Relation Any Any) Functor;pop.Relation Any Any;push.Relation Any Any Any;remove.Relation Any Any Any;removeAll.Relation Functor (Relation Any) Functor;removeIndex.Relation Any Any Any;reverse.Relation Functor Functor;size.Relation Any Any} % Cons Functor % module % rest list2_rest(_l,_b,_upvals):-_upvals=[],(_l = [_|_b]). % first list2_first(_l,_a,_upvals):-_upvals=[],(_l = [_a|_]). % unique list2_unique(_l,_l2,_dup,_upvals):-_upvals=[_unique_],(call_cl(_unique_,[_l2,_l,[]])). % unique_ list2_unique_(_l,_l2,_dup,_upvals):-_upvals=[],((((true),(_l = [],_l2 = _l);_l = '[|]'(_e,_tail),(((get_(_list,"has",T16),_T15 = T16,call_cl(_T15,[_dup,_e])),(_l2 = _tail2,call(list2_unique_(_tail,_tail2,_dup),_upvals));_dup1 = '[|]'(_e,_dup),_l2 = '[|]'(_e,_tail2),call(list2_unique_(_tail,_tail2,_dup1),_upvals)))))). % iterate list2_iterate(_p,_n,_x,_y,_upvals):-_upvals=[],(((_n = 0.0,_y = _x);(dif(_n,0.0),call_cl(_p,[_x,_x2]),{_n-1.0=T14},call(list2_iterate(_p,T14,_x2,_y),_upvals)))). % map list2_map(_l,_p,_l2,_upvals):-_upvals=[],(((_l = [],_l2 = []);(dif(_l,[]),_l = [_head|_tail],_l2 = [_head2|_tail2],call_cl(_p,[_head,_head2]),call(list2_map(_tail,_p,_tail2),_upvals)))). % every list2_every(_l,_p,_upvals):-_upvals=[],(((_l = [],_l2 = []);(dif(_l,[]),_l = [_head|_tail],call_cl(_p,[_head]),call(list2_every(_tail,_p),_upvals)))). % join3 list2_join3(_l,_sep,_s2,_upvals):-_upvals=[_join2],(((_l = '[|]'(_s,_tail),call_cl(_join2,[_tail,_sep,_s,_s2]));(dif(_l,'[|]'(_s,_tail)),_s2 = "",_l = []))). % join2 list2_join2(_l,_sep,_s,_s2,_upvals):-_upvals=[],(((_l = [_b|_tail],calc(_s+_sep,T12),calc(T12+_b,T13),_s1 = T13,call(list2_join2(_tail,_sep,_s1,_s2),_upvals));(dif(_l,[_b|_tail]),_l = [],_s = _s2))). % fold list2_fold(_l,_pred,_s,_result,_upvals):-_upvals=[],(((_l = [_b|_tail],call_cl(_pred,[_s,_b,_c]),call(list2_fold(_tail,_pred,_c,_result),_upvals));(dif(_l,[_b|_tail]),_l = [],_result = _s))). % join5 list2_join5(_l,_sep,_s,_upvals):-_upvals=[_join],(((_l = [_a|[]],_s = _a);(dif(_l,[_a|[]]),(_l = [_s1|_tail],calc(_s1+_sep,T10),calc(T10+_s2,T11),_s = T11,call_cl(_join,[_tail,_sep,_s2]));(dif(_l,[_s1|_tail]),_l = [],_s = "")))). % join list2_join(_l,_sep,_s,_upvals):-_upvals=[],(((_l = [_a|[]],_s = _a);(dif(_l,[_a|[]]),(_l = [_s1|_tail],calc(_s1+_sep,T8),calc(T8+_s2,T9),_s = T9,call(list2_join(_tail,_sep,_s2),_upvals));(dif(_l,[_s1|_tail]),_l = [],_s = "")))). % each list2_each(_l,_p,_l2,_upvals):-_upvals=[_eachIndex],(call_cl(_eachIndex,[_l,_p,0.0,_l2])). % eachIndex list2_eachIndex(_l,_p,_i,_l2,_upvals):-_upvals=[],(((_l = [],_l2 = []);(dif(_l,[]),_l = [_head|_tail],_l2 = [_head2|_tail2],call_cl(_p,[_i,_head,_head2]),calc(_i+1.0,T7),call(list2_eachIndex(_tail,_p,T7,_tail2),_upvals)))). % reverse list2_reverse(_l,_l2,_upvals):-_upvals=[_concat],(((_l = [_a|_tail],call(list2_reverse(_tail,_ltemp),_upvals),call_cl(_concat,[_ltemp,[_a|[]],_l2]));(dif(_l,[_a|_tail]),_l = [],_l2 = []))). % slice list2_slice(_l,_i,_j,_l2,_upvals):-_upvals=[],(slice(_l,_i,_j,_l2)). % last list2_last(_l,_a,_upvals):-_upvals=[_get,_size],(call_cl(_size,[_l,_T5]),{_T5-1.0=T6},call_cl(_get,[_l,T6,_a])). % findOnce list2_findOnce(_l,_e,_i,_upvals):-_upvals=[],(_l = [_x|_tail],((_e = _x,_i = 0.0,!);(dif(_e,_x),call(list2_findOnce(_tail,_e,_j),_upvals),calc(_j+1.0,T4),_i = T4,!))). % find list2_find(_l,_e,_i,_upvals):-_upvals=[],(_l = [_e1|_tail],((_e = _e1,_i = 0.0);(dif(_e,_e1),call(list2_find(_tail,_e,_j),_upvals),calc(_j+1.0,T3),_i = T3))). % pop list2_pop(_l,_l2,_upvals):-_upvals=[],(_l = [_x|_l2],_l2 = _tail). % push list2_push(_l,_x,_l2,_upvals):-_upvals=[],(_l2 = [_x|_l]). % concat list2_concat(_l,_l2,_l3,_upvals):-_upvals=[],(append(_l,_l2,_l3)). % has list2_has(_l,_e,_upvals):-_upvals=[],(memberd_t(_e,_l,_)). % has2 list2_has2(_l,_e,_upvals):-_upvals=[],(((_l = [_e|_],writeln_('[|]'("e",'[|]'(_e,[]))),true);(dif(_l,[_e|_]),writeln_(_l),_l = [_|_tail],call(list2_has2(_tail,_e),_upvals)))). % remove list2_remove(_l,_n,_l2,_upvals):-_upvals=[],((((true),(_l = [],_l2 = _l);_l = '[|]'(_e,_tail),((_e = _n,_l2 = _tail);(dif(_e,_n),_l2 = '[|]'(_e,_l3),call(list2_remove(_tail,_n,_l3),_upvals)))))). % removeIndex list2_removeIndex(_l,_i,_l2,_upvals):-_upvals=[_remove2],(type(_i,"int"),call_cl(_remove2,[_l,0.0,_i,_l2])). % remove2 list2_remove2(_l,_i,_n,_l2,_upvals):-_upvals=[],((((true),(_l = [],_l2 = _l);_l = '[|]'(_e1,_tail),((_i = _n,_l2 = _tail);(dif(_i,_n),calc(_i+1.0,T2),_i2 = T2,_l2 = '[|]'(_e1,_l3),call(list2_remove2(_tail,_i2,_n,_l3),_upvals)))))). % removeAll list2_removeAll(_l,_p,_l2,_upvals):-_upvals=[],((((_l = []),(_l2 = []);_l = [_head|_tail],(((call_cl(_p,[_head])),(call(list2_removeAll(_tail,_p,_l2),_upvals));_l2 = [_head|_tail2],call(list2_removeAll(_tail,_p,_tail2),_upvals)))))). % filter list2_filter(_l,_p,_l2,_upvals):-_upvals=[],((((_l = []),(_l2 = []);_l = [_head|_tail],(((call_cl(_p,[_head])),(_l2 = [_head|_tail2],call(list2_filter(_tail,_p,_tail2),_upvals));call(list2_filter(_tail,_p,_l2),_upvals)))))). % size list2_size(_l,_n,_upvals):-_upvals=[],(int(_n,X1),length(_l,X1)). % get list2_get(_L,_N,_Element,_upvals):-_upvals=[],(nth0(_N,_L,_Element)). % main list2(X):-_get = clos([],list2_get),creq1("string",_string,T1),call(T1,_string),_size = clos([],list2_size),_filter = clos([],list2_filter),_removeAll = clos([],list2_removeAll),_remove2 = clos([],list2_remove2),_removeIndex = clos([_remove2],list2_removeIndex),_remove = clos([],list2_remove),_has2 = clos([],list2_has2),_has = clos([],list2_has),_concat = clos([],list2_concat),_push = clos([],list2_push),_pop = clos([],list2_pop),_find = clos([],list2_find),_findOnce = clos([],list2_findOnce),_last = clos([_get,_size],list2_last),_slice = clos([],list2_slice),_reverse = clos([_concat],list2_reverse),_eachIndex = clos([],list2_eachIndex),_each = clos([_eachIndex],list2_each),_join = clos([],list2_join),_join5 = clos([_join],list2_join5),_fold = clos([],list2_fold),_join2 = clos([],list2_join2),_join3 = clos([_join2],list2_join3),_every = clos([],list2_every),_map = clos([],list2_map),_iterate = clos([],list2_iterate),_unique_ = clos([],list2_unique_),_unique = clos([_unique_],list2_unique),_first = clos([],list2_first),_rest = clos([],list2_rest),new(T17),set_(T17,"find",_find,T19),set_(T19,"findOnce",_findOnce,T20),set_(T20,"size",_size,T21),set_(T21,"length",_size,T22),set_(T22,"filter",_filter,T23),set_(T23,"removeIndex",_removeIndex,T24),set_(T24,"remove",_remove,T25),set_(T25,"push",_push,T26),set_(T26,"pop",_pop,T27),set_(T27,"has",_has,T28),set_(T28,"has2",_has2,T29),set_(T29,"at",_get,T30),set_(T30,"concat",_concat,T31),set_(T31,"every",_every,T32),set_(T32,"forall",_every,T33),set_(T33,"map",_map,T34),set_(T34,"removeAll",_removeAll,T35),set_(T35,"join",_join3,T36),set_(T36,"fold",_fold,T37),set_(T37,"each",_each,T38),set_(T38,"eachIndex",_eachIndex,T39),set_(T39,"iterate",_iterate,T40),set_(T40,"reverse",_reverse,T41),set_(T41,"first",_first,T42),set_(T42,"last",_last,T18),_t = T18,X=_t.