String case: Difference between revisions

Content deleted Content added
Hout (talk | contribs)
→‎{{header|AppleScript}}: Updated primitives, and simplified test, replacing map with `ap` <*>
Hout (talk | contribs)
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 {intFs, intXs} to {length of fs, length of xs}
set {nf, nx} to {length of fs, length of xs}
set lst to {}
set lst to {}
repeat with i from 1 to intFs
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 intXs
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