String case: Difference between revisions
Content deleted Content added
→{{header|AppleScript}}: Updated primitives, and simplified test, replacing map with `ap` <*> |
m →{{header|AppleScript}}: minor update of one primitive (ap <*>) |
||
Line 370: | Line 370: | ||
-- (<*> | ap) :: [(a -> b)] -> [a] -> [b] |
-- (<*> | ap) :: [(a -> b)] -> [a] -> [b] |
||
on ap(fs, xs) |
on ap(fs, xs) |
||
set { |
set {nf, nx} to {length of fs, length of xs} |
||
set lst to {} |
set lst to {} |
||
repeat with i from 1 to |
repeat with i from 1 to nf |
||
tell mReturn(item i of fs) |
tell mReturn(item i of fs) |
||
repeat with j from 1 to |
repeat with j from 1 to nx |
||
set end of lst to |λ|(contents of (item j of xs)) |
set end of lst to |λ|(contents of (item j of xs)) |
||
end repeat |
end repeat |