Hey guys so here is my code on which I get the weird error of \"Multiple Declarations of mirror\". I have other functions before that but none of them are named mirror... Any id
Multiple definitions of a function must have the same number of arguments left of the equals sign. This is not required from a theory standpoint (note: one of the definitons could certainly be a lambda or return another function) but people seem to like it as such definitions typically indicate a bug.
Specifically, you have one definition with zero arguments:
mirror = undefined
And one definition with one argument:
mirror (Node tL x tR) = Node x mirror tR mirror tL
you probably want:
mirror _ = undefined
mirror (Node tL x tR) = Node x mirror tR mirror tL