Hi,
Is there any way of getting the following code to immediately return
True without performing the element-by-element comparison? Essentially
this boils down to checking whether pointers are equal before
comparing the contents.
> main = print $ f == f
> where f = [1..10^9]
Thanks!!
nikhil
, that's pretty sweet! Thank you very much! :)
nikhil
>
>
> ghci> doit
> 12
>
> On Sat, Apr 16, 2011 at 7:29 AM, Nikhil A. Patil
> wrote:
>
> > Hi,
> >
> > I am planning a simple monadic DSL (frankly, calling it a DSL is a bit
> >
On Sat, Apr 16, 2011 at 08:55 CDT, Felipe Almeida Lessa wrote:
> On Sat, Apr 16, 2011 at 10:29 AM, Nikhil A. Patil
> wrote:
> >> doit :: DSL Term
> >> doit = do (+) <- (+)
> >> n0 <- n0
> >> k <- k
> >>
Hi,
I am planning a simple monadic DSL (frankly, calling it a DSL is a bit
of a stretch; it's just a somewhat glorified state monad), and I wish to
implement some kind of "import" functionality for it.
The DSL code looks something like this:
> doit :: DSL Term
> doit = do (+) <- define_function