
22 Dec
2015
22 Dec
'15
12:08 a.m.
On Tue, Dec 22, 2015 at 1:56 AM, Olumide <50295@web.de> wrote:
Is the operator :-: a constructor? I'm confused because the definition of :-: is not prefixed by the data keyword?
The confusion is that the pattern-matching for append, i.e. (.++), is done infix style: Empty .++ ys = ys (x :-: xs) .++ ys = x :-: (xs .++ ys) This defines (.++). It doesn't define (:-:). The definition of (.++) pattern matches on (:-:) in (.++)-infix style to do the job. -- Kim-Ee