String case: Difference between revisions
→{{header|AppleScript}}: Updated primitives, and simplified test, replacing map with `ap` <*>
(→{{header|AppleScript}}: Updated primitives) |
(→{{header|AppleScript}}: Updated primitives, and simplified test, replacing map with `ap` <*>) |
||
Line 333:
<lang applescript>use framework "Foundation"
-- TEST -----------------------------------------------------------------------
on run
▲ mReturn(f)'s |λ|("alphaBETA αβγδΕΖΗΘ")
end |λ|▼
--> {"alphabeta αβγδεζηθ", "Alphabeta Αβγδεζηθ", "ALPHABETA ΑΒΓΔΕΖΗΘ"}
end run
Line 373 ⟶ 367:
end toUpper
--
-- (<*> | ap) :: [(a -> b)] -> [a] -> [b]
on
set {intFs, intXs} to
tell
set end of lst to |λ|(contents of (item j of xs))
return lst▼
end
end
end ap
-- Lift 2nd class handler function into 1st class script wrapper
Line 397 ⟶ 394:
end mReturn</lang>
{{Out}}
<lang AppleScript>{"
=={{header|Arbre}}==
|