12 Fundamentals of Functional Programming Flashcards
1
Q
Define function type.
A
2
Q
Define co-domain and domain.
A
Domain is a set from which a function’s input values are chosen
Co-domain is the set from which the function’s output value is chosen.
A function is mapping from a set of inputs (domain) and set out outputs (co-domain)
3
Q
What is a first-class object and how is it used?
A
any object that can be passed as an argument to or can be returned by a function
4
Q
Outline what a functional paradigm is.
A
A functional program describes series of functions. Each function takes in data in the form of arguments and returns an output.
e.g. Haskell, Standard ML
Scheme
Lisp.