On Thu, Jul 17, 2003 at 12:03:19PM +0100, Bayley, Alistair wrote:
This is what I've turned it into to get it to work. It seems a bit clumsy;
is there a better way to write this?
test n =
case True of
_ | n == one - one
| n == two - two
|
At 12:03 17/07/03 +0100, Bayley, Alistair wrote:
This is what I've turned it into to get it to work. It seems a bit clumsy;
is there a better way to write this?
test n =
case True of
_ | n == one - one
| n == two - two
| otherwise - three
At 12:03 PM +0100 7/17/03, Bayley, Alistair wrote:
I've just debugged a program that used a case expression, but where I was
trying to match on constants rather than literals. Here's a contrived
example:
module Main where
one = 1
two = 2
test n =
case n of
one - one
Hi Alistair,
| I've just debugged a program that used a case expression, but
| where I was trying to match on constants rather than literals.
| Here's a contrived example:
|
| module Main where
| one = 1
| two = 2
|
| test n =
| case n of
| one - one
| two -