April 2020
Intermediate to advanced
344 pages
11h 13m
English
For every other type in Elm, lazy checks whether the value has the same location in memory as it did before. Values other than strings and numbers get assigned a unique location in memory when they are initially defined, and they retain this memory location when they get passed around or returned from functions. For example, here are two values with the same content but different locations in memory:
jess =
[ "dev", "dot", "to" ]
ben =
[ "dev", "dot", "to" ]
Here, jess == ben evaluates to True, but jess and ben have different memory locations because they were initially defined separately. Table C.1 summarizes this relationship.
|
First value ... |
|---|
Read now
Unlock full access