[Haskell-cafe] Quick Sort Algorithm

PR Stanley prstanley at ntlworld.com
Fri May 18 12:18:43 EDT 2007


Dear Sir,
At the risk of seeming a little pedantic let me remind you that 
Andrew's remark was in reply to the following message:
start message
Well, actually, this was scanned from a book but the OCR process 
wasn't 100% effective. So, I was hoping the list would easily 
identify and replace the erronious characters.
Thanks for trying, anyway.
Paul
end message
If that isn't clear enough then ...
Regards,
Paul


>PR Stanley <prstanley at ntlworld.com> wrote:
>
> > No, Mr. smarty pants, I can't. I'll leave you to work out why I rely
> > on a scanner and an OCR engine for reading printed materials. *smile*
>
>Ah.  Well, given your original question ("why does this code not work?")
>it was probably a reasonable assumption that you had written it
>yourself, and the problem you wanted help with was understanding the
>semantics of what you had written.  Whereas if you had phrased your
>question initially more like "I am having difficulty reading/using this
>OCR'd version of someone else's code", the responses could perhaps have
>been more helpful more quickly.
>
>Anyway, the corrected code snippet follows:
>
>   qSort (x:xs) =
>      qSort smaller ++ [x] ++ qSort larger
>      where
>      smaller = [a | a <- xs, a <= x ]
>      larger  = [b | b <- xs, b > x ]
>
>If your reading software can be trained to convert sequences of symbols
>into phrases, then "++" might be pronounced as "append", and "<-" as
>"drawn from".
>
>Regards,
>     Malcolm
>_______________________________________________
>Haskell-Cafe mailing list
>Haskell-Cafe at haskell.org
>http://www.haskell.org/mailman/listinfo/haskell-cafe



More information about the Haskell-Cafe mailing list