Variables that are either empty or of a fixed type can be implemented with the “Maybe” type constructor, an instance of these constructs. For 10 points each:
[10h] Name these constructs that Haskell uses to allow for input and output operations while avoiding side effects. These constructs are equipped with return and bind operations.
ANSWER: monads [reject “monoids”]
[10e] Monads are used in a programming paradigm named for these constructs which includes languages like Haskell and OCaml, contrasted with object-oriented languages. Recursion involves these constructs calling themselves.
ANSWER: functions [accept procedures or subroutines or methods; accept functional programming]
[10m] Recursive functions that are also “tail recursive” avoid this situation after the compiler performs tail-call optimization. This situation occurs when the number of unresolved function calls becomes too large and can lead to a segmentation fault.
ANSWER: stack overflow [prompt on overflow]
<Editors, Other Science>