4.12 Fundamentals of Functional Programming Flashcards
(3 cards)
1
Q
What is a function
A
a rule for each element in some set A of inputs, assigns an output chosen from set B, but without necessarily using every member
2
Q
How does a function work
A
An argument is passed to a function, the rule is applied to the argument, creating the return value output
3
Q
What is a higher-order function
A
a function that takes a function as an argument and returns a function as a result