Re: [Haskell-cafe] FW: please help... small problem

2007-11-10 Thread Yitzchak Gale
Hi Ryan, You wrote: > I've attempted to cut down this module... but I cannot see where... can > someone help... You don't need "wordToInt" - just use "read" instead. Look at the type of the function "map" in the Prelude - you can use it to get rid of "method" and "test". After that, your progra

[Haskell-cafe] FW: please help... small problem

2007-11-10 Thread Ryan Bloor
hi I've attempted to cut down this module... but I cannot see where... can someone help... Ryan thanks From: [EMAIL PROTECTED]: Subject: FW: please help... small problemDate: Fri, 9 Nov 2007 21:57:30 + sorry heres the code I always do that. From: [EMAIL PROTECTED]: Subject:

Re: [Haskell-cafe] FW: please help... small problem

2007-11-09 Thread Luke Palmer
I'm not sure what you mean by not use auxillary functions. This code is about as compact as it is going to get if you don't want to use library functions. wordToInt is not necessary at all, of course; you could just replace "wordToInt" everywhere with "read", and type inference will figure out th

[Haskell-cafe] FW: please help... small problem

2007-11-09 Thread Ryan Bloor
sorry heres the code I always do that. From: [EMAIL PROTECTED]: Subject: please help... small problemDate: Fri, 9 Nov 2007 21:44:35 + hi Is there anyway to cut down this code and to not use auxillary functons, but instead use pattern matching? The code basically splits up a list 'rs