How do I create a list in Oz?
问题 I'm trying to create a list in Oz using the following code: local Loop10 Xs in proc {Loop10 I} Xs={List.append Xs I} if I == 10 then skip else {Browse I} {Loop10 I+1} end {Browse Xs} end {Loop10 0} end The Mozart compiler shows that the code is accepted, but no Browse window opens up. All I'm trying to do is create a list in Oz. What's wrong with the code? 回答1: Not sure that that's what you want, but to create a list of all whole numbers between X and Y (inclusive) you could do: local fun