On Sat, Sep 30, 2006 at 08:51:40PM +0200, Udo Stenzel wrote: > To: Matthias Fischmann <[EMAIL PROTECTED]> > Cc: [email protected] > From: Udo Stenzel <[EMAIL PROTECTED]> > Date: Sat, 30 Sep 2006 20:51:40 +0200 > Subject: Re: [Haskell-cafe] cutting long strings into lines > > Matthias Fischmann wrote: > > although this wasn't the original problem, i like it, too :). but now > > i am stuck in finding an optimal implementation for lines. > > Isn't the obvious one good enough? > > lines [] = [] > lines s = go s > where > go [] = [[]] > go ('\n':s) = [] : lines s > go (c:s) = let (l:ls) = go s in (c:l):ls
thanks. good enough, yes. just not obvious to me... (-: matthias
signature.asc
Description: Digital signature
_______________________________________________ Haskell-Cafe mailing list [email protected] http://www.haskell.org/mailman/listinfo/haskell-cafe
