Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion use of make-lazy?
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Conrad  
View profile  
 More options Nov 15 2010, 9:47 am
From: Conrad <drc...@gmail.com>
Date: Mon, 15 Nov 2010 06:47:14 -0800 (PST)
Local: Mon, Nov 15 2010 9:47 am
Subject: Re: use of make-lazy?
You are right- I didn't read your question carefully enough.

Indeed, there are few uses for MAKE-LAZY. It's main use is as a
debugging tool- Or you might use it in a test suite.

On Nov 14, 5:47 pm, peter <peter.fri...@gmail.com> wrote:

> Hi Jason,  Conrad

> On Nov 14, 7:35 pm, Jason Stidd <stiddsg...@gmail.com> wrote:

> > From the point of view of Haskell, the benefit of the lazy list is not
> > to shorten the list, but to only calculate what you need. The list may
> > be large (in fact you can use infinite lists with lazy evaluation),
> > but if you only evaluate or look at what you need, its faster. If I
> > have a list of 1000 items and I only need the car or the first five
> > items for instance, there's no reason to look at all 1,000 items.
> > Especially if I'm going to be looking at the list three or four times.
> > And in addition, it won't be evaluated until we absolutely need it.
> > This is a huge benefit if for some reason we don't end up needing to
> > evaluate it all.  I hope this helps.

> I'm not familiar with Haskell, but I'm sure it cannot have an infinite
> lazy list with all those items actually present. And even with non-
> lazy lists, if you only need the first 5  items, you don't have to
> look at all 1000 items either (unless you want the last 5 items -- but
> then a lazy list would not be better off).

> I think this is in line with Conrad's reply to my question, where he
> states that

> > Even though the data generated by step 1 may be prohibitively large,
> > we actually only calculate possible moves on an "as needed" basis.
> > This would only be possible by performing the calculations in step 1
> > in a lazy manner.

> But my original question remains: what is the use of MAKE-LAZY? It
> converts an *existing* list, with *all data present*, into a lazy
> list, a system which is designed to only generate the data needed.

> Note that I'm not questioning the purpose of lazy lists; I'm
> questioning the usefulness of MAKE-LAZY (other than educational).

> Cheers,
> Peter.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.