I am not fully convinced here , maybe lazy eval is a cult 

In a lazy evaluation scheme, the evaluation of an expression is deferred until the
value of the expression is actually needed elsewhere in the computation. That
is, the expression is evaluated on demand. This contrasts with what is called
eager evaluation in which an expression is evaluated as soon as its inputs are
available.
For example, if eager evaluation is used, an argument (which may be an arbi-
trary expression) of a function call is evaluated before the body of the function.
If lazy evaluation is used, the argument is not evaluated until the value is actu-
ally needed during the evaluation of the function body. If an argument’s value
is never needed, then the argument is expression is never evaluated.
Why should we care? Well, this facility allows programmers to construct and
use data structures that are conceptually unbounded or infinite in size. As
long as a program never actually needs to inspect the entire structure, then a
terminating computation is still possible.
For example, we might define the list of natural numbers as a list beginning
with 0, followed by the list formed by adding one to each element of the list of
natural numbers.
Lazy evaluation thus allows programmers to separate the data from the control.
They can define a data structure without having to worry about how it is
processed and they can define functions that manipulate the data structure
without having to worry about its size or how it is created. This ability to
separate the data from the control of processing enables programs to be highly
modular
#haskell
john.cs.olemiss.edu/~hcc/csci4

Follow

I am not fully convinced here , maybe lazy eval is a cult 

@xameer lazy eval is basically GC for execution.

If you like your memory and cars on manual, you'll hate it there.

Sign in to participate in the conversation
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.