Multiplication tables: Difference between revisions
m
→AppleScript :: Functional
m (→AppleScript :: Functional: Tweaked types for simpler separation between model and display) |
|||
Line 546:
on multiplicationTable(n)
tableText(mulTable(enumFromTo(1,
end multiplicationTable
Line 613:
return lst
end concatMap
-- enumFromTo :: Int -> Int -> [Int]
Line 627 ⟶ 628:
return lst
end enumFromTo
-- foldl :: (a -> b -> a) -> a -> [b] -> a
Line 639 ⟶ 641:
end tell
end foldl
-- intercalate :: Text -> [Text] -> Text
Line 647 ⟶ 650:
return strJoined
end intercalate
-- justifyRight :: Int -> Char -> Text -> Text
Line 656 ⟶ 660:
end if
end justifyRight
-- map :: (a -> b) -> [a] -> [b]
Line 668 ⟶ 673:
end tell
end map
-- Lift 2nd class handler function into 1st class script wrapper
|