11 May 21:30
Re: dropping hyphens and \n in words
Achim Schneider <barsoap <at> web.de>
2008-05-11 19:30:57 GMT
2008-05-11 19:30:57 GMT
"Chaddaï Fouché" <chaddai.fouche <at> gmail.com> wrote: > 2008/5/11 Achim Schneider <barsoap <at> web.de>: > > 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.
RSS Feed