
20 Oct
2001
20 Oct
'01
1:54 p.m.
On Sat, 20 Oct 2001, Richard wrote:
Patrik Jansson writes:
This also works: (the (mis)match with the empty list is delayed until the end of time)
test5= let a: b: ~(c: ~[]) = "Hello" in [a,b,c] ^^^^^^^ typo! You meant [a,b].
No, I did not! The program is tested in hugs and ghci and does what it "should". If I had used [a,b] then both test5 and test6 would work. I wanted to show an example where a variable inside an irrefutable pattern is requested. And further how the inner ~[] versus [] makes a difference. /Patrik