> Since you're on the line, could you confirm or deny that the (//)
> operator is something equivalent to (roughly):
>
> a // ps = runST (thaw a >>= \u -> update ps >> unsafeFreeze u)
>
> I.e. that the list of updates are treated as an atomic operation?
> Because doing it that way explicitly
"Simon Marlow" <[EMAIL PROTECTED]> writes:
>> OTOH, doing lots of small (//) seems to be faster than doing a few
>> large ones (containing the same updates). Go figure.
> That's bizarre. Perhaps the results are obscured by some other
> optimisations which are happening.
It is probably an opera
Sorry about such lame questions. I'm currently using Haskell 'in anger' for
the first time, so differences with other functional languages are biting me
occasionally.
I need to convert Ints to Strings and vice-versa. What's the best way to do
this? I've not found library functions for this.
Secon
> I need to convert Ints to Strings and vice-versa. What's the best
> way to do
> this? I've not found library functions for this.
Read and Show. Hmm... should have tried that before posting. :)
My second question about integer division still stands, however.
Thanks,
Sarah
_
On Thu, 23 Jan 2003, Sarah Thompson wrote:
> I need to convert Ints to Strings and vice-versa. What's the best way to do
> this? I've not found library functions for this.
Use read and show.
Prelude> show 23
"23"
Prelude> read "23" :: Int
23
(Type annotation needed on the second example because
On Sun, 19 Jan 2003 16:02:41 -0600
Jon Cast <[EMAIL PROTECTED]> wrote:
> > But, to fully exploit the power of a "functionally-programmed"
> > desktop, the interface should allow the user to map an operation
> > onto all the objects of the panel; in this case the allowed
> > operations should be
Nick Name <[EMAIL PROTECTED]> wrote:
> On Sun, 19 Jan 2003 16:02:41 -0600
> Jon Cast <[EMAIL PROTECTED]> wrote:
> > > But, to fully exploit the power of a "functionally-programmed"
> > > desktop, the interface should allow the user to map an operation
> > > onto all the objects of the panel; in th
On Thu, 23 Jan 2003 15:38:31 -0600
Jon Cast <[EMAIL PROTECTED]> wrote:
>
>
> > Another idea: if I allow the list of objects in the panel to be
> > infinite,
>
> Sorry, but I'm having difficulty figuring out where you'd get an
> infinite list of objects to put in the panel. I suspect any so
Nick Name <[EMAIL PROTECTED]> wrote:
> On Thu, 23 Jan 2003 15:38:31 -0600
> Jon Cast <[EMAIL PROTECTED]> wrote:
> > > Another idea: if I allow the list of objects in the panel to be
> > > infinite,
> > Sorry, but I'm having difficulty figuring out where you'd get an
> > infinite list of objec