d3 $ note ((scaleP scalePattern $ (rotR 4) $ (+ slow 8 "x" <~> ((0.25 ~>) generateMelodicSeed)) -- $ slow 4 \n $ generateMelodicSeed ))#s "[pe-gtr:8,midi]" #gain 1.2 #orbit 2 #midichan 3 let melody = slow 6 $ "0 2 [4 8 .] [3 4 3] 8 4 9" d9 $ midicmd "start" # s "midi" scalePattern = slow 12 ""

Lazy Evaluation

Many functional languages enable code to be evaluated lazily by default. This means the the code is not executed until the moment when the final return value is needed for interaction with the outside world. This enables functions to manipulate otherwise impossible data structures, such as infinite lists, so long as, by the time the final call is made, the functions are composed in such a way the limits the size of the data. Lazy evaluation pairs well with closures and partial application in enabling the programmer to compose functionality together.


Notes mentioning this note



Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.