Higher-order functions: Difference between revisions
→{{header|AppleScript}}: updated primitives
m (→{{header|AppleScript}}: Removed a comment duplication) |
(→{{header|AppleScript}}: updated primitives) |
||
Line 254:
set lst to {}
repeat with i from 1 to lng
set end of lst to
end repeat
return lst
Line 273:
set lng to length of xs
repeat with i from 1 to lng
set v to
end repeat
return v
Line 289:
repeat with i from 1 to lng
set v to item i of xs
if
end repeat
return lst
Line 302:
else
script
property
end script
end if
Line 328:
x mod 2 = 0
end isEven</lang>
{{Out}}
<lang applescript>{{0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20},
|