Common sorted list: Difference between revisions
Content added Content deleted
(→{{header|AppleScript}}: Added a composition of atomic functions) |
|||
Line 45: | Line 45: | ||
-- concat :: [[a]] -> [a] |
-- concat :: [[a]] -> [a] |
||
on concat(xs) |
on concat(xs) |
||
⚫ | |||
set ca to current application |
|||
⚫ | |||
valueForKeyPath:"@unionOfArrays.self") as list |
valueForKeyPath:"@unionOfArrays.self") as list |
||
end concat |
end concat |
||
Line 53: | Line 52: | ||
-- nub :: [a] -> [a] |
-- nub :: [a] -> [a] |
||
on nub(xs) |
on nub(xs) |
||
⚫ | |||
set ca to current application |
|||
⚫ | |||
valueForKeyPath:"@distinctUnionOfObjects.self") as list |
valueForKeyPath:"@distinctUnionOfObjects.self") as list |
||
end nub |
end nub |