RosettaCodeData/Task/Higher-order-functions/Inform-7/higher-order-functions-1.inf

16 lines
465 B
INI

Higher Order Functions is a room.
To decide which number is (N - number) added to (M - number) (this is addition):
decide on N + M.
To decide which number is multiply (N - number) by (M - number) (this is multiplication):
decide on N * M.
To demonstrate (P - phrase (number, number) -> number) as (title - text):
say "[title]: [P applied to 12 and 34]."
When play begins:
demonstrate addition as "Add";
demonstrate multiplication as "Mul";
end the story.