I was doing a past paper and was very confused by this question:
enter image description here
I tried to research about it, look at threads, watch youtube videos but I still do not understand it and it made me even more confused.
Pairer takes a value of any type and returns a list of that value:
pairer :: a -> [a]
Now the return type of the left pairer takes as input result of first pairer application but this returns a [a] and pairer expects an a, this is not compatible as the codomain of first needs to match with domain of second
Can someone please explain how pairer . pairer is valid?
I tried to follow through and did not understand it as like I said above to my knowledge the return type of first function applied needs to match domain of second function
stevenoakman is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.