On Sat, Feb 6, 2010 at 1:42 PM, Mark Spezzano
mark.spezz...@chariot.net.au wrote:
Just wondering whether I can use ShowS or tupling or Difference Lists to
speed up the following code?...
In case you do want to use a difference list, you could also use a
DString[1]. A DString is just a newtype
Am Samstag, den 06.02.2010, 10:28 -0800 schrieb Ryan Ingram:
As other people have mentioned, you are duplicating library
functionality. But nobody has actually talked about the performance
characteristics of your code.
Fortunately for you, the calls to (++) in your recursion are
Hi,
Just wondering whether I can use ShowS or tupling or Difference Lists to speed
up the following code?
It's basic text processing. It takes in a list of Lines where each Line is a
list of Words and intersperses between them then concatenates them into a
longer String. Note that there is
Am Samstag, den 06.02.2010, 23:12 +1030 schrieb Mark Spezzano:
Hi,
Just wondering whether I can use ShowS or tupling or Difference Lists to
speed up the following code?
It's basic text processing. It takes in a list of Lines where each Line
is a list of Words and intersperses between
On Sat, Feb 06, 2010 at 11:12:40PM +1030, Mark Spezzano wrote:
-- Function: joinLines
-- Joins the Words within Lines together with whitespace and newline
characters
-- Argument: Lines to pad with whitespace and newlines
-- Evaluate: The processed and concatenated String
joinLines :: [Line]
Am Samstag 06 Februar 2010 13:42:40 schrieb Mark Spezzano:
Hi,
Just wondering whether I can use ShowS or tupling or Difference Lists to
speed up the following code?
It's basic text processing. It takes in a list of Lines where each Line
is a list of Words and intersperses between them
As other people have mentioned, you are duplicating library
functionality. But nobody has actually talked about the performance
characteristics of your code.
Fortunately for you, the calls to (++) in your recursion are
right-associative, so you don't have an asymptotic problem where your
program