/* (c) 1999-2005, Rony G. Flatscher, Wirtschaftsuniversitaet Wien, Austria Europe A *possible* solution to excercise # 15 */ Fruit_Bag = .bag~of( "apple", "apple", "pear", "strawberry", "apple", "banana", - "plum", "plum", "banana", "apple", "pear", "melon", - "peanut", "peanut", "peanut", "peanut", "peanut", "apple", - "peanut", "pineapple", "banana", "plum", "pear", "pear", - "plum", "plum", "banana", "apple", "pear", "melon", - "peanut", "peanut", "peanut", "apple", "peanut", "pineapple", - "banana", "peanut", "peanut", "peanut", "peanut", "peanut", - "apple", "peanut", "pineapple", "banana", "peanut", "melon", - "mango", "peanut", "peanut", "apple", "peanut", "pineapple", - "banana", "pear" ) SAY "Total of fruits in bag:" Fruit_Bag~items SAY Fruit_Set = .set~new~union(Fruit_Bag) SAY "consisting of:" DO fruit OVER Fruit_Set SAY RIGHT(fruit, 21) || ":" RIGHT( Fruit_Bag~allat(fruit)~items, 3 ) END