Skip to content

Commit

Permalink
fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
mikhailazaryan authored Dec 21, 2023
1 parent c697041 commit c4e5937
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions chapter1.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
## Strict vs. Lazy Evaluation
- strict languages: the arguments to a function are evaluated before the body of the function;
lazy languages: arguments are evaluated in a demand-driven fashion; they are initially passed in unevaluated form and are evaluated only when (and if!) the computation needs the results to continue; once a given argument is evaluated, the value of that argument is cached -> if it is ever needed again, it can be looked up rather than recomputed (this caching is known as *memoization*)
lazy languages: arguments are evaluated in a demand-driven fashion; they are initially passed in unevaluated form and are evaluated only when (and if!) the computation needs the results to continue; once a given argument is evaluated, the value of that argument is cached -> if it is ever needed again, it can be looked up rather than recomputed (this caching is known as *memoization*)

- strict languages: can describe worst-case data structures, but not amortized ones;
lazy languages: can describe amortized data structures, but not worst-case ones
Expand All @@ -25,4 +25,4 @@ lazy languages: can describe amortized data structures, but not worst-case ones
3. **an object / a version:** an instance of a data type (such as particular list or tree)
4. **a persistent identity:** a unique identity that is invariant under updates;
different versions of the same data structure *share a common persistent identity*;
the persistent identity of an ephemeral data structure can be reified as a reference cell, but this approach is insufficient for modelling the persistent identity of a persistent data structure
the persistent identity of an ephemeral data structure can be reified as a reference cell, but this approach is insufficient for modelling the persistent identity of a persistent data structure

0 comments on commit c4e5937

Please sign in to comment.