RosettaCodeData/Task/Nested-function/AppleScript/nested-function-2.applescript

13 lines
298 B
AppleScript

-- makeList :: String -> String
on makeList(separator)
-- makeItem :: String -> Int -> String
script makeItem
on |λ|(x, i)
(i & separator & x & linefeed) as string
end |λ|
end script
map(makeItem, ["first", "second", "third"]) as string
end makeList