Advanced Functions Flashcards
1
Q
What is a guard
A
Boolean expression, easier to read, shorter
2
Q
What are local definitions?
A
They may be either where definitions, or let definitions.
3
Q
What is a where definition
A
Type of local definition that allows one to name a value and to use it in an expression.
i.e. p div
q where p = sum xs etc
4
Q
What is a let definition
A
Type of local definition that allows one to name a value and to use it in an expression. i.e. let p = sum xs in p `div` q
5
Q
Where OR Let?
A
Where corresponds to top down programming and is preferred as let corresponds to bottom-up programming.
6
Q
What is creeping featurism?
A
Describes a tendancy for systems to become more complex over time as more features are added than were in the original design or plan. Can lead to stability issues etc.