{
  "code": null,
  "collection": "architecture",
  "href": "https://banes-lab.com/ontology#architecture-lazy-evaluation",
  "id": "lazy-evaluation",
  "kind": "approach",
  "layer": {
    "href": "https://banes-lab.com/ontology/schema#layer-execution-core",
    "json": "https://banes-lab.com/json/records/layer/execution-core",
    "label": "Execution Core",
    "markdown": "https://banes-lab.com/records/layer/execution-core.md",
    "ref": "layer:execution-core"
  },
  "name": "Lazy Evaluation",
  "ref": "architecture:lazy-evaluation",
  "relations": [
    {
      "links": [
        {
          "href": "https://banes-lab.com/ontology/lexicon#lexicon-deferred-execution-semantics",
          "json": "https://banes-lab.com/json/records/lexicon/deferred-execution-semantics",
          "label": "Deferred Execution Semantics",
          "markdown": "https://banes-lab.com/records/lexicon/deferred-execution-semantics.md",
          "ref": "lexicon:deferred-execution-semantics"
        }
      ],
      "relation": "requires"
    },
    {
      "links": [
        {
          "href": "https://banes-lab.com/ontology#architecture-memory-efficiency",
          "json": "https://banes-lab.com/json/records/architecture/memory-efficiency",
          "label": "Memory Efficiency",
          "markdown": "https://banes-lab.com/records/architecture/memory-efficiency.md",
          "ref": "architecture:memory-efficiency"
        }
      ],
      "relation": "reinforces"
    },
    {
      "links": [
        {
          "href": "https://banes-lab.com/ontology/lexicon#lexicon-avoiding-unneeded-work",
          "json": "https://banes-lab.com/json/records/lexicon/avoiding-unneeded-work",
          "label": "Avoiding Unneeded Work",
          "markdown": "https://banes-lab.com/records/lexicon/avoiding-unneeded-work.md",
          "ref": "lexicon:avoiding-unneeded-work"
        }
      ],
      "relation": "enables"
    },
    {
      "links": [
        {
          "href": "https://banes-lab.com/ontology/lexicon#lexicon-debuggability-resource-lifetime",
          "json": "https://banes-lab.com/json/records/lexicon/debuggability-resource-lifetime",
          "label": "Debuggability/Resource Lifetime",
          "markdown": "https://banes-lab.com/records/lexicon/debuggability-resource-lifetime.md",
          "ref": "lexicon:debuggability-resource-lifetime"
        },
        {
          "href": "https://banes-lab.com/ontology/lexicon#lexicon-eager-full-materialization",
          "json": "https://banes-lab.com/json/records/lexicon/eager-full-materialization",
          "label": "Eager Full Materialization",
          "markdown": "https://banes-lab.com/records/lexicon/eager-full-materialization.md",
          "ref": "lexicon:eager-full-materialization"
        }
      ],
      "relation": "tensions-with"
    },
    {
      "links": [
        {
          "href": "https://banes-lab.com/ontology/schema#tension-debuggability-resource-lifetime-lazy-evaluation",
          "json": "https://banes-lab.com/json/records/tension/debuggability-resource-lifetime-lazy-evaluation",
          "label": "Lazy Evaluation / Debuggability/Resource Lifetime",
          "markdown": "https://banes-lab.com/records/tension/debuggability-resource-lifetime-lazy-evaluation.md",
          "ref": "tension:debuggability-resource-lifetime-lazy-evaluation"
        },
        {
          "href": "https://banes-lab.com/ontology/schema#tension-eager-full-materialization-lazy-evaluation",
          "json": "https://banes-lab.com/json/records/tension/eager-full-materialization-lazy-evaluation",
          "label": "Lazy Evaluation / Eager Full Materialization",
          "markdown": "https://banes-lab.com/records/tension/eager-full-materialization-lazy-evaluation.md",
          "ref": "tension:eager-full-materialization-lazy-evaluation"
        }
      ],
      "relation": "tensions"
    },
    {
      "links": [
        {
          "href": "https://banes-lab.com/ontology/lexicon#lexicon-full-materialization",
          "json": "https://banes-lab.com/json/records/lexicon/full-materialization",
          "label": "Full Materialization",
          "markdown": "https://banes-lab.com/records/lexicon/full-materialization.md",
          "ref": "lexicon:full-materialization"
        }
      ],
      "relation": "violated-by"
    },
    {
      "links": [
        {
          "href": "https://banes-lab.com/ontology#architecture-iterator-pattern",
          "json": "https://banes-lab.com/json/records/architecture/iterator-pattern",
          "label": "Iterator Pattern",
          "markdown": "https://banes-lab.com/records/architecture/iterator-pattern.md",
          "ref": "architecture:iterator-pattern"
        }
      ],
      "relation": "refactored-by"
    },
    {
      "links": [
        {
          "href": "https://banes-lab.com/ontology/schema#vocabulary-severity-contextual",
          "json": "https://banes-lab.com/json/records/vocabulary/severity-contextual",
          "label": "contextual",
          "markdown": "https://banes-lab.com/records/vocabulary/severity-contextual.md",
          "ref": "vocabulary:severity-contextual"
        }
      ],
      "relation": "severity"
    },
    {
      "links": [
        {
          "href": "https://banes-lab.com/ontology#architecture-category-streaming-pipeline-dataflow-processing",
          "json": "https://banes-lab.com/json/records/architecture-category/streaming-pipeline-dataflow-processing",
          "label": "Streaming / Pipeline / Dataflow Processing",
          "markdown": "https://banes-lab.com/records/architecture-category/streaming-pipeline-dataflow-processing.md",
          "ref": "architecture-category:streaming-pipeline-dataflow-processing"
        }
      ],
      "relation": "category"
    },
    {
      "links": [
        {
          "href": "https://banes-lab.com/software-architecture#the-direction-axis",
          "json": "https://banes-lab.com/json/software-architecture/model/the-direction-axis",
          "label": "The direction axis",
          "markdown": "https://banes-lab.com/software-architecture/model/the-direction-axis.md",
          "ref": "chapter:/software-architecture#the-direction-axis"
        },
        {
          "href": "https://banes-lab.com/ontology#architecture-category-scalability-performance-optimization",
          "json": "https://banes-lab.com/json/ontology/principles/architecture-category-scalability-performance-optimization",
          "label": "Scalability / Performance / Optimization",
          "markdown": "https://banes-lab.com/ontology/principles/architecture-category-scalability-performance-optimization.md",
          "ref": "chapter:/ontology#architecture-category-scalability-performance-optimization"
        },
        {
          "href": "https://banes-lab.com/ontology/lexicon#lexicon-category-scalability-performance-optimization",
          "json": "https://banes-lab.com/json/ontology/lexicon/lexicon-category-scalability-performance-optimization",
          "label": "Scalability / Performance / Optimization",
          "markdown": "https://banes-lab.com/ontology/lexicon/lexicon-category-scalability-performance-optimization.md",
          "ref": "chapter:/ontology/lexicon#lexicon-category-scalability-performance-optimization"
        },
        {
          "href": "https://banes-lab.com/ontology/lexicon#lexicon-category-streaming-pipeline-dataflow-processing",
          "json": "https://banes-lab.com/json/ontology/lexicon/lexicon-category-streaming-pipeline-dataflow-processing",
          "label": "Streaming / Pipeline / Dataflow Processing",
          "markdown": "https://banes-lab.com/ontology/lexicon/lexicon-category-streaming-pipeline-dataflow-processing.md",
          "ref": "chapter:/ontology/lexicon#lexicon-category-streaming-pipeline-dataflow-processing"
        },
        {
          "href": "https://banes-lab.com/ontology/schema#the-vocabulary-severity",
          "json": "https://banes-lab.com/json/ontology/schema/the-vocabulary-severity",
          "label": "Severity levels",
          "markdown": "https://banes-lab.com/ontology/schema/the-vocabulary-severity.md",
          "ref": "chapter:/ontology/schema#the-vocabulary-severity"
        },
        {
          "href": "https://banes-lab.com/ontology/schema#the-resolutions",
          "json": "https://banes-lab.com/json/ontology/schema/the-resolutions",
          "label": "The resolutions",
          "markdown": "https://banes-lab.com/ontology/schema/the-resolutions.md",
          "ref": "chapter:/ontology/schema#the-resolutions"
        }
      ],
      "relation": "linked-from"
    },
    {
      "links": [
        {
          "href": "https://banes-lab.com/anatomy/tree#file-domain-registries-page-registry-ts",
          "json": "https://banes-lab.com/json/source/tree/domain/registries/page.registry.ts",
          "label": "registerPage",
          "markdown": "https://banes-lab.com/source/tree/domain/registries/page.registry.ts.md",
          "ref": "anatomy:file-domain-registries-page-registry-ts"
        },
        {
          "href": "https://banes-lab.com/anatomy/tree#folder-presentation-records",
          "json": "https://banes-lab.com/json/anatomy/tree/folder-presentation-records",
          "label": "presentation/records",
          "markdown": "https://banes-lab.com/anatomy/tree/folder-presentation-records.md",
          "ref": "chapter:/anatomy/tree#folder-presentation-records"
        },
        {
          "href": "https://banes-lab.com/anatomy/tree#file-presentation-records-records-barrel-ts",
          "json": "https://banes-lab.com/json/source/tree/presentation/records/records.barrel.ts",
          "label": "presentation/records/records.barrel.ts",
          "markdown": "https://banes-lab.com/source/tree/presentation/records/records.barrel.ts.md",
          "ref": "anatomy:file-presentation-records-records-barrel-ts"
        }
      ],
      "relation": "evidence"
    }
  ],
  "summary": "An approach in which a value is computed only when something consumes it.",
  "siblings": {
    "next": {
      "href": "https://banes-lab.com/ontology#architecture-sequential-access",
      "json": "https://banes-lab.com/json/records/architecture/sequential-access",
      "label": "Sequential Access",
      "markdown": "https://banes-lab.com/records/architecture/sequential-access.md",
      "ref": "architecture:sequential-access"
    },
    "previous": {
      "href": "https://banes-lab.com/ontology#architecture-pipeline-architecture",
      "json": "https://banes-lab.com/json/records/architecture/pipeline-architecture",
      "label": "Pipeline Architecture",
      "markdown": "https://banes-lab.com/records/architecture/pipeline-architecture.md",
      "ref": "architecture:pipeline-architecture"
    }
  },
  "up": {
    "href": null,
    "json": "https://banes-lab.com/json/api/records/architecture",
    "label": "Architecture principles",
    "markdown": "https://banes-lab.com/api/records/architecture.md",
    "ref": "api:records/architecture"
  },
  "aliases": [],
  "exemplar": {
    "after": "const firstTen = sequence(millionFoos)\n  .map(normalizeFoo)\n  .filter(foo => foo.active)\n  .take(10)\n  .toArray();",
    "before": "const normalized = millionFoos.map(normalizeFoo);\nconst active = normalized.filter(foo => foo.active);\nconst firstTen = active.slice(0, 10);",
    "lang": "ts",
    "medium": "code"
  },
  "formedBy": null,
  "scope": [
    "computation",
    "collection",
    "stream"
  ],
  "severity": "contextual"
}
