
11 Nov
2010
11 Nov
'10
12:06 p.m.
On 11 Nov 2010, at 17:03, C K Kashyap wrote:
Hi, I'd like to do something like this -
Instead of doing this -
f x = case x of 1 -> "One" 2 -> "Two"
I'd like to do this -
v1 = 1 v2 = 2
f x = case of v1 -> "One" v2 -> "Two"
Is that possible?
Pattern matching against expressions is not possible, except in the very very limited case of n + k patterns, so no. Bob