On 10/2/08, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> G'day all.
>
> Quoting John Dorsey <[EMAIL PROTECTED]>:
>
>
> > Contributions are welcome. The project could use a tutorial, and a
> > decent test suite. Strict singleton tuples are planned for the next
> > version.
> >
>
> I hope it ha
On 10/1/08, John Van Enk <[EMAIL PROTECTED]> wrote:
> There's the well known "How to shoot your self in the foot" list which I
> have it printed and taped on my desk at work.
>
> http://www-users.cs.york.ac.uk/susan/joke/foot.htm
>
> I had a co-worker ask me how you'd shoot your self in the foot w
Something like this perhaps:
writeFile "output.csv" . printCSV . map updateLine . fromRight =<<
parseCSVFromFile "input.csv"
(with fromRight = either (error "fromRight :: Left") id or something equivalent)
On 9/30/08, wman <[EMAIL PROTECTED]> wrote:
> I got asked how to do one particular thing i
On 9/29/08, Gianfranco Alongi <[EMAIL PROTECTED]> wrote:
> Oh, yeah, I thought you really meant that you would force that "baby" down. :)
> Nice to hear that you wouldn't. Not even "lazy evaluation" would save
> you there 7-8 hours later.
2kg of chocolate 'thunks' to 'force' really might 'blow y
On Mon, Sep 22, 2008 at 2:07 PM, Bulat Ziganshin
<[EMAIL PROTECTED]> wrote:
> this overall test is uselles for speed comparison. afair, there are
> only 2-3 programs whose speed isn't heavily depend on libraries. in
> DNA test, for example, Tcl (or PHP?) was leader just because it has
> better rege
The key is letting haskell be lazy and produce the output one item at
a time. My solution below generates a list of all indices to be
inversed (with indices being duplicated as appropriate), then for each
index in that list inverses the corresponding element in the array.
The list can be written c
Why not do something like this instead?
untab [] = []
untab xs = head : untab (drop 1 tail)
where (head, tail) = break (== '\t') xs
BTW, going the extra step through unfoldr seems unnecessary to me - is
there any special reason to prefer unfolds over simple recursive
functions here? (Of cours
Do you simply want the set of coordinates, or do you want to do
something smart with the them (i.e. optimize a function value etc)?
In the first case, with a good starting point and a function that
enumerates all coordinates (by going in a spiral, perhaps), I think
this can be done in O(nm), wher