Common sorted list: Difference between revisions

m
(→‎{{header|AppleScript}}: Added a composition of atomic functions)
Line 45:
-- concat :: [[a]] -> [a]
on concat(xs)
((cacurrent application's NSArray's arrayWithArray:xs)'s ¬
set ca to current application
((ca's NSArray's arrayWithArray:xs)'s ¬
valueForKeyPath:"@unionOfArrays.self") as list
end concat
Line 53 ⟶ 52:
-- nub :: [a] -> [a]
on nub(xs)
((cacurrent application's NSArray's arrayWithArray:xs)'s ¬
set ca to current application
((ca's NSArray's arrayWithArray:xs)'s ¬
valueForKeyPath:"@distinctUnionOfObjects.self") as list
end nub
9,655

edits