Common sorted list: Difference between revisions
Added AppleScript.
m (Any union) |
(Added AppleScript.) |
||
Line 8:
'''output''' = [1,3,4,5,7,8,9]
<br><br>
=={{header|AppleScript}}==
<lang applescript>use AppleScript version "2.4" -- OS X 10.10 (Yosemite) or later
use framework "Foundation"
local nums, output
set nums to current application's class "NSArray"'s arrayWithArray:({{5, 1, 3, 8, 9, 4, 8, 7}, {3, 5, 9, 8, 4}, {1, 3, 7, 9}})
set output to (nums's valueForKeyPath:("@distinctUnionOfArrays.self"))'s sortedArrayUsingSelector:("compare:")
return output as list</lang>
{{output}}
<lang applescript>{1, 3, 4, 5, 7, 8, 9}</lang>
=={{header|F_Sharp|F#}}==
|