23 Nov
2002
23 Nov
'02
1:34 a.m.
Hi Fabian, * Fabian Meier <fabian@meier-bielefeld.de> [2002-11-22 14:55 +0100]:
The file versuch.lhs (attachment) consists of a function gc2. If you try gc2 25 15, hugs produces a run time error.
gc2 ist defined as:
gc2::Int->Int->Int gc2 a1 a2 = gc2 a2 (mod a1 a2) gc2 a2 0 = a2
You have to change the last two lines, and learn how pattern matching in Haskell works ;o)
gc2::Int->Int->Int gc2 a2 0 = a2 gc2 a1 a2 = gc2 a2 (mod a1 a2)
Regards, Olli -- {- IST & IIS _ INF _ UniBwM :: obraun@informatik.unibw-muenchen.de -} {- Tele-Consulting GmbH :: obraun@Tele-Consulting.com -} {- FreeBSD Commmitter :: obraun@FreeBSD.org -}