"Chaddaï Fouché" <[EMAIL PROTECTED]> wrote:

> 2008/5/11 Achim Schneider <[EMAIL PROTECTED]>:
> >  Excuse my bluntness, but I utterly fail to make sense of this.
> >  Reformulating your understanding of it would surely be beneficial.
> 
> He has a routine that gives him a list of words classified by line,
> and he want the hyphens to be accounted for.
> So that :
> "Hello mis-
> ter world !"
> gives [(1,["Hello","mister"]),(2,["world","!"])]
> 
Well, that's either a relatively complex hand-written recursion, or you
map a predicate that tests for hyphens over the list and zip it with the
original, offset by one, and then map it all into the result.

-- 
(c) this sig last receiving data processing entity. Inspect headers for
past copyright information. All rights reserved. Unauthorised copying,
hiring, renting, public performance and/or broadcasting of this
signature prohibited. 

_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to