| commit | 1d239b38adb3cb19a446615fcfc96420fe1263af | [log] [tgz] |
|---|---|---|
| author | Boris Kaul <localvoid@gmail.com> | Sat Sep 19 07:41:19 2015 |
| committer | Boris Kaul <localvoid@gmail.com> | Sat Sep 19 07:41:19 2015 |
| tree | 5f45f01585afe29746569fbc8bb48ba450b06a88 | |
| parent | b1b7c7499933d8a7825abf08020455256e3b4a33 [diff] | |
| parent | 12d308af7dd9657b813610e3e04bd79372ef0f23 [diff] |
Merge pull request #3 from kseo/mapkey Override operator == and hashCode.
There are two versions of this data structure:
final t = new Tuple2<String, int>('a', 10); print(t.i1); // prints 'a' print(t.i2); // prints '10'
In computing, a persistent data structure is a data structure that always preserves the previous version of itself when it is modified. Such data structures are effectively immutable, as their operations do not (visibly) update the structure in-place, but instead always yield a new updated structure. (A persistent data structure is not a data structure committed to persistent storage, such as a disk; this is a different and unrelated sense of the word “persistent.”)
final t1 = const PersistentTuple2<String, int>('a', 10); final t2 = t1.setI1('c'); // t2 is a new [PersistentTuple2] object with i1 is 'c' and i2 is 10.