Top "Lazy-evaluation" questions

be evaluated more than once.

Python class member lazy initialization

I would like to know what is the python way of initializing a class member but only when accessing it, …

python lazy-evaluation lazy-initialization
lazy function definitions in scala

I've been learning scala and I gotta say that it's a really cool language. I especially like its pattern matching …

scala design-patterns lazy-loading lazy-evaluation lazy-initialization
Angular lazy one-time binding for expressions

AngularJS has a new feature since the version 1.3.0-beta.10: the "lazy one-time binding". Simple expressions can be prefixed with ::, telling …

javascript angularjs binding lazy-evaluation
Scala's lazy arguments: How do they work?

In the file Parsers.scala (Scala 2.9.1) from the parser combinators library I seem to have come across a lesser known …

scala lazy-evaluation
foldl versus foldr behavior with infinite lists

The code for the myAny function in this question uses foldr. It stops processing an infinite list when the predicate …

haskell lazy-evaluation combinators fold
Lazy evaluation in Ruby

I have a situation for Ruby, where an object is possibly necessary to be created, but it is not sure. …

ruby lazy-loading lazy-evaluation
Spark Transformation - Why its lazy and what is the advantage?

Spark Transformations are lazily evaluated - when we call the action it executes all the transformations based on lineage graph. …

apache-spark transformation lazy-evaluation
Directory.EnumerateFiles => UnauthorizedAccessException

There is a nice new method in .NET 4.0 for getting files in a directory in a streaming way via enumeration. …

.net filesystems lazy-evaluation unauthorizedaccessexcepti
Return first non-null value

I have a number of functions: String first(){} String second(){} ... String default(){} Each can return a null value, except the …

java lazy-evaluation coalesce
Are there something like Python generators in Ruby?

I am new to Ruby, is there a way to yield values from Ruby functions? If yes, how? If not, …

ruby lazy-evaluation