[Haskell-cafe] Re: Non-Overlapping Patterns

Achim Schneider barsoap at web.de
Mon May 5 11:48:56 EDT 2008


Achim Schneider <barsoap at web.de> wrote:

> isZero n = case n of
> 	0 -> True
> 	n -> if n /= 0
> 		then False
> 		else undefined
> 
You can't exchange the order, here, of course, the semantics of this
and a guard-version would differ.
 

-- 
(c) this sig last receiving data processing entity. Inspect headers for
past copyright information. All rights reserved. Unauthorised copying,
hiring, renting, public performance and/or broadcasting of this
signature prohibited. 



More information about the Haskell-Cafe mailing list