
Want this course?
Video time: 10m37s
Want this course?
Transients
Course: Clojure Collections
When you need to modify an immutable value, you actually make a modified copy. If you make a lot of changes, you make a copy for each change. If you're just going to throw those copies away, that is a major waste. Transients let you create a local mutable copy of a collection, modify it, and then freeze it. When used with large-batch modifications, it can significantly improve performance.
Buy this course to view the code.
Next Lesson
Course: Clojure Collections
Lessons
Introduction to Clojure's Collections
5 min
Data structures
8 min
Vector collection
24 min
HashMap collection
30 min
Set collection
19 min
List collection
12 min
Queue collection
11 min
Sorted Map collection
11 min
Sorted Set collection
7 min
Access patterns
8 min
Sequential Access Pattern
26 min
Remembering Duplicates Access Pattern
16 min
Lookup by key Access Pattern
12 min
Associate key and value Access Pattern
19 min
Dissociate a key and value Access Pattern
4 min
Count the elements Access Pattern
6 min
Equality Comparison Access Pattern
12 min
Removing an item from a set Access Pattern
8 min
Splitting a sequence Access Pattern
8 min
Containment Check Access Pattern
9 min
First-in, first-out Access Pattern
12 min
Last-in, First-out Access Pattern
6 min
Usage patterns
2 min
Entity Usage Pattern
17 min
Index Usage Pattern
18 min
Tuple Usage Pattern
21 min
Multi-comparison Usage Pattern
11 min
Transients
11 min
Usage in an Atom
17 min
Hybrid Collections
11 min
Hybrid Types
27 min
Vectors and Lists in syntax
6 min
Lazy sequences
5 min
Collections vs sequences
14 min