let list = import "std/lists.ucg"; let t = import "std/testing.ucg"; let list_to_join = [1, 2, 3]; assert t.equal{ left=list.ops{list=list_to_join}.str_join(","), right="1,2,3" }; assert t.equal{ left=list.ops{list=[0, 1, 2, 3]}.len, right=4, }; assert t.equal{ left = list.ops{list=[0, 1, 2, 3]}.reverse().list, right = [3, 2, 1, 0], }; assert t.equal{ left=list.ops{list=["foo", "bar"]}.enumerate().list, right=[[0, "foo"], [1, "bar"]], }; assert t.equal{ left=list.enumerate{start=1, list=["foo", "bar"]}, right=[[1, "foo"], [2, "bar"]], }; assert t.equal{ left=list.enumerate{ start=1, step=2, list=["foo", "bar"] }, right=[[1, "foo"], [3, "bar"]], }; assert t.equal{ left=list.zip{list1=[0, 1], list2=[3, 4]}, right=[[0, 3], [1, 4]], }; assert t.equal{ left=list.tail([0,1,2,3,4]), right=[1,2,3,4], }; assert t.equal{ left=list.ops{list=[0,1,2,3,4]}.head(), right=[0], }; assert t.equal{ left=list.ops{list=[0,1,2,3,4]}.tail().list, right=[1,2,3,4], }; assert t.equal{ left=list.slice{end=2, list=[0,1,2,3]}, right=[0,1,2], }; assert t.equal{ left=list.slice{list=[0,1,2,3]}, right=[0,1,2,3], }; assert t.equal{ left=list.slice{end=0, list=[0,1,2,3]}, right=[0], }; assert t.equal{ left=list.slice{list=[]}, right=[], }; assert t.equal{ left=list.slice{list=[0]}, right=[0], };