Common sorted list: Difference between revisions
→{{header|Wren}}: Simpler.
(Added Wren) |
(→{{header|Wren}}: Simpler.) |
||
Line 81:
import "/sort" for Sort
var
res = Lst.distinct(res)
▲ return ll.skip(2).reduce(first2) { |acc, l| distinctUnion2.call(acc, l) }
}
var ll = [[5, 1, 3, 8, 9, 4, 8, 7], [3, 5, 9, 8, 4], [1, 3, 7, 9]]
System.print("Distinct sorted union of %(ll) is:")
▲Sort.insertion(u)
▲System.print(u)</lang>
{{out}}
|