Interval arithmetic

2003-08-27 Thread Jonas Ritter
Hi all, I am interested in interval arithmetic. Does anyone know something about haskell implementations in this domain? It would be nice to have a datatype Interval with the elementary operations {+,-,*,/}, where + :: Intervall - Intervall - Intervall (a,b) + (c,d) = (a+c,b+d) - :: Intervall

Re: ML like pattern matching

2003-08-22 Thread Jonas Ritter
Hi Cagdas Ozgenc wrote: Greetings, How do I emulate the when clause in ML for pattern matching? In other words when a pattern is matched (from a list of patterns of a function) and to enforce additional predicates I use guards, but if the guard condition is not satisfied I want Haskell to