Exercises Part 1
-
Implement function
anyLarger, which should returnTrue, if and only if a list of values contains at least one element larger than a given reference value. Use interfaceCompin your implementation. -
Implement function
allLarger, which should returnTrue, if and only if a list of values contains only elements larger than a given reference value. Note, that this is trivially true for the empty list. Use interfaceCompin your implementation. -
Implement function
maxElem, which tries to extract the largest element from a list of values with aCompimplementation. Likewise forminElem, which tries to extract the smallest element. Note, that the possibility of the list being empty must be considered when deciding on the output type. -
Define an interface
Concatfor values like lists or strings, which can be concatenated. Provide implementations for lists and strings. -
Implement function
concatListfor concatenating the values in a list holding values with aConcatimplementation. Make sure to reflect the possibility of the list being empty in your output type.