Pangram checker: Difference between revisions
Content deleted Content added
Added FreeBASIC |
m →{{header|AppleScript}}: Updated primitives |
||
Line 215:
-- GENERIC HIGHER ORDER FUNCTIONS (FILTER AND MAP)
-- filter :: (a -> Bool) -> [a] -> [a]
on filter(f, xs)
set lst to {}
set
repeat with i from 1 to lng
end repeat▼
end filter
-- map :: (a -> b) -> [a] -> [b]
on map(f, xs)
set lng to length of xs
set lst to {}
repeat with i from 1 to lng
set end of lst to
end repeat
return lst
end map
-- Lift 2nd class handler function into 1st class script wrapper
-- mReturn :: Handler -> Script
on mReturn(f)
if class of f is script then
▲ else
property lambda : f▼
▲ property lambda : f
end script
end if
end mReturn
Line 274 ⟶ 276:
end if
end unwrap
</lang>
|