📚
All Examples
Browse the full library.
→
🌱
Foundations
Start here — lists, recursion, pattern matching, Option/Result.
→
🌿
Intermediate
Level up — monads, traits, iterators, error handling patterns.
→
🌲
Advanced
Go deep — each example explains why the concept exists before showing code.
→
🔥
Expert
Category theory made concrete — every abstract idea grounded in working Rust.
→
⚡
Master
The frontier — powerful patterns explained from first principles, no prior background needed.
→
#001
Applying a Function Twice
#001
001-higher-order-functions — Higher Order Functions
#001
001 — Last Element of a List
#002
Function Composition
#002
Last Two Elements
#002
002-list-operations — List Operations
#003
K-th Element
#003
003-pattern-matching — Pattern Matching
#003
Pipeline Operator
#004
List Length
#004
List Map From Scratch
#004
004-option-result — Option Result
#005
Currying and Partial Application
#005
List Filter From Scratch
#005
005-reverse-list — Reverse List
#006
006: Function Composition
#006
006: Palindrome Check
#007
007: Flatten Nested List
#008
008: Eliminate Consecutive Duplicates
#009
009: Pack Consecutive Duplicates
#010
010: Run-Length Encoding
#011
Modified Run-Length Encoding
#012
Decode Run-Length Encoding
#013
Direct Run-Length Encoding
#014
Duplicate Elements
#015
Replicate Elements N Times
#016
016: Drop Every Nth
#017
017: Split List
#018
018: Slice List
#019
019: Rotate Left
#020
020: Remove Kth
#021
021: Insert At
#022
022: Range
#023
023: Random Select
#024
024: Lotto Draw
#025
025: Random Permutation
#026
026: Combinations
#027
027: Group By Size
#028
028: Sort By Length
#029
029: Binary Tree
#030
030: Count Leaves
#031
031: Collect Leaves
#032
032: Internal Nodes
#033
033: At Level
#034
034: Complete Binary Tree
#035
035: Layout Binary Tree
#036
036: Tree String
#037
037: Tree Preorder
#038
038: Tree Inorder
#039
039: Dotstring Tree
#040
040: Dotstring Parse
#041
041: Option Basics
#042
042: Option Map
#043
043: Option Bind
#044
044: Option Filter
#045
045: Result Basics
#046
046: Result Map
#047
047: Result Bind
#048
048: Error Propagation
#049
049: Error Conversion
#050
050: Custom Error Types
#051
051: Applying a Function Twice
#052
052: Function Composition
#053
053: Pipeline Operator
#054
054: Applicative Validation
#054
054: List Map from Scratch
#055
055: List Filter from Scratch
#056
056: Fold Right
#056
056: Result as Monad
#057
057: Fold Left
#058
058: Variants — Days of the Week
#059
059: Expression Tree
#060
060: Option — Safe List Maximum
#061
Binary Tree — Size, Membership, Traversal
#062
062: Isogram Check
#062
062: Records and Structs
#063
063: Run-Length Encoding
#063
063: Stack Module
#064
064: Balanced Parentheses
#065
Association List — Functional Key-Value Store
#066
066 — Phantom Types
#067
067: Lazy Sequences
#068
068: Frequency Counter
#068
068: Tail-Recursive Accumulator
#069
Sieve of Eratosthenes (Functional)
#069
069: Unfold (Anamorphism)
#070
Hamming Distance
#070
070: Scan Left
#071
Collatz Conjecture
#071
071: GCD and LCM
#072
072: Error Accumulation
#072
072: Railway-Oriented Programming
#073
073: Topological Sort
#073
073: Parse Don't Validate (Validated Types)
#074
074: Bifunctor — Mapping Over Two Type Parameters
#074
074: Currying and Partial Application
#075
075: Difference List
#075
075: Merge Sort
#076
076: GCD and LCM — Euclidean Algorithm
#076
076: Trait Objects
#077
077: Generic Bounds
#077
077: Matrix Operations — Functional 2D
#078
078: Topological Sort — DAG Ordering
#078
078: Where Clauses
#079
079: Associated Types
#079
079: Lambda Calculus Interpreter
#080
080: Catamorphism — Generalized Fold
#081
081: Difference List — O(1) Append
#081
081: Newtype Pattern
#082
082: Nucleotide Count — Bioinformatics
#082
082: Type Aliases
#083
083: Display Trait
#083
083: Robot Simulator — State with Immutable Records
#084
084: From and Into Traits
#084
084: Phone Number Parser — Validation Pipeline
#085
085: Accumulate — Custom Map
#085
085: Iterator Trait
#086
086: Custom Iterator with State
#086
086: Space Age — Float Computation
#087
087: Difference of Squares
#087
087: Iterator Adapters
#088
088: Allergies — Bitflag Decoding
#088
088: Iterator Consumers
#089
089: Bob — String Pattern Matching
#089
089: Lazy Sequences
#090
Frequency Analysis — Letter Distribution
#090
090: Infinite Iterators
#091
091: Caesar Cipher
#091
091: Zip Unzip
#092
092: Pangram Check
#092
092: Scan Accumulate
#093
093: Isogram Check
#093
093: Windows Chunks
#094
094: Peekable Iterator
#094
094: Run-Length Encoding
#095
095: Balanced Parentheses
#095
095: Double Ended
#096
096: Exact Size
#096
096: Recursive Descent Parser
#097
097: Flatten Iterator
#097
097: Zipper — Functional List Cursor
#098
098: Church Numerals — Functions as Numbers
#098
098: Partition Iterator
#099
099: CPS — Continuation-Passing Style
#099
099: Group By Iter
#100
Dijkstra's Shortest Path
#100
100: Phantom Types — Type-Safe Units
#100
100: Step By
#101
101: Lazy Sequences
#101
101: Move Semantics
#102
102: Clone Copy
#102
102: Frequency Counter
#103
103: Borrowing Shared
#103
103: Unfold — Generating Sequences from Seeds
#104
104: Borrowing Mutable
#104
104: Scan Left — Running Accumulation
#105
105: Lifetime Basics
#105
105: Trie — Prefix Tree for Strings
#106
106: Lifetime Elision
#107
107: Lifetimes in Structs
#108
108: Rc\ — Shared Ownership
#109
109: Arc\ — Thread-Safe Shared Ownership
#110
110: Cell\ — Interior Mutability for Copy Types
#111
111: RefCell\ — Runtime Borrow Checking
#112
112: Cow\ — Clone on Write
#113
113: String vs &str
#114
114: Slice Patterns
#115
115: Vec Operations Functionally
#116
116: Box\ — Heap Allocation
#117
117: Recursive Types with Box
#118
118: Deref Coercions
#119
119: Zero-Cost Abstractions
#120
120: Fn, FnMut, FnOnce
#121
121: Closure Capture Modes
#122
122: Higher-Order Functions with Lifetime Constraints
#123
123: impl Trait
#124
124: dyn Trait — Dynamic Dispatch
#125
125: Send and Sync
#126
126: Const Generics
#127
127: Const Functions
#128
128: Type-Level Booleans
#129
129: Type-Level Natural Numbers
#130
130: Typestate Pattern
#131
131: Builder Pattern with Typestate
#132
132: Phantom Units of Measure
#133
133: Variance
#134
134: Higher-Kinded Types Simulation
#135
135: Generic Newtype Patterns
#136
136: Existential Types
#137
137: Rank-2 Types
#138
138: Type Witnesses / GADT Encoding
#139
139: HList — Heterogeneous List
#140
140: Type-Safe Printf
#141
141: Singleton Types
#142
142: Type Equality Witnesses
#143
143: Associated Type Bounds
#144
144: GAT Basics — Generic Associated Types
#145
145: GAT Collections — Generic Associated Types
#146
146: Opaque Types — Hiding Implementation Details
#147
147: Type Erasure
#148
148: Sealed Traits
#149
149: Extension Traits
#150
150: Coherence Rules — One Implementation Per Type
#151
151: Introduction to Parser Combinators
#152
152: Character Parsers
#153
153: Satisfy Parser
#154
154: String Parser
#155
155: Many Parser
#156
156: Optional Parser
#157
157: Choice Parser
#158
158: Sequence Parser
#159
159: Map Parser
#160
160: FlatMap Parser
#161
161: Digit Parser
#162
162: Identifier Parser
#163
163: Whitespace Parser
#164
164: Number Parser
#165
165: Keyword Parser
#166
166: Separated List
#167
167: Recursive Parser
#168
168: Expression Parser
#169
169: Operator Precedence
#170
170: Error Recovery
#171
171: CSV Parser
#172
172: INI File Parser
#173
173: Lisp / S-expression Parser
#174
174: Arithmetic Expression Evaluator
#175
175: Complete JSON Parser
#176
176: Introduction to GADTs
#177
177: GADT Typed Expression Evaluator
#178
178: Length-Indexed Lists
#179
179: GADT Preventing Runtime Errors
#180
180: PhantomData for API Safety
#181
181: Type-Safe SQL-Like Query Builder
#182
182: Existential Types
#183
183: Heterogeneous Vec with Safe Downcast
#184
184: Introduction to Free Monads
#185
185: Free Monad DSL
#186
186: Free Monad Interpreter — Separate DSL from Execution
#187
187: Free Monad with State
#188
188: Operational Monad
#189
189: Effect Handlers — Introduction
#190
190: Effect Handler — Logging and Nondeterminism
#191
191: Effect Handlers for Exceptions
#192
192: Effect Handlers for State
#193
193: Effect Handlers for Async IO
#194
194: Coroutines and Generators via Effects
#195
195: Continuation-Passing Style
#196
196: Delimited Continuations
#197
197: Trampoline — Heap-Based Tail Call Optimization
#198
198: Church Encoding — Numbers and Booleans as Functions
#199
199: Scott Encoding — Pattern Matching as Functions
#200
200: Tagless Final
#201
201: The Nested Update Problem — Why Lenses Exist
#202
202: Lens Basics — View, Set, and Over
#203
203: Lens Laws — What Makes a Lens Well-Behaved
#204
204: Lens Composition — Zoom Into Nested Structs
#205
205: Lens Modify — Transform a Field With a Function
#206
206: Prism Basics — Optics for Enum Variants
#207
207: Prism Laws — What Makes a Prism Well-Behaved
#208
208: Traversal
#209
209: Affine Traversal
#210
210: Iso Basics
#211
211: Optics Hierarchy
#212
212: Van Laarhoven Lenses
#213
213: Practical Lens — Deeply Nested Config Update
#214
214: Fold Optic
#215
215: Recursion Schemes — Separating What From How
#216
216: Fix Point — How Recursive Types Work Under the Hood
#217
217: Catamorphism — The Universal Fold
#218
218: Anamorphism — Build a Structure From a Seed
#219
219: Hylomorphism — Build Then Fold, in One Pass
#220
220: Paramorphism
#221
221: Apomorphism
#222
222: Histomorphism
#223
223: Zygomorphism
#224
224: Mutumorphism
#225
225: Prepromorphism
#226
226: Category Theory Basics
#227
227: Functor Category — Natural Transformations
#228
228: Natural Transformations
#229
229: Monoid as a Category
#230
230: Semigroup
#231
231: Product Types
#232
232: Sum Types
#233
233: Curry-Howard Correspondence
#234
Propositions as Types — Type Theory Basics
#235
235: Yoneda Lemma
#236
236: Coyoneda
#237
237: Day Convolution
#238
238: Profunctor Basics
#239
239: Strong Profunctor
#240
Choice Profunctor — Optionally Applied
#241
241: Comonad Basics
#242
242: Store Comonad
#243
243: Env Comonad (CoReader)
#244
244: Comonad Laws
#245
245: Cofree Comonad
#246
246: Adjunctions
#247
247: Limits and Colimits
#248
248: Kan Extensions
#249
249: Monad from Adjunction
#250
250: Grand Synthesis
#251
Quicksort
#252
252: Insertion Sort
#253
253: Graph BFS
#254
254: Graph DFS
#255
255: Lazy Fibonacci
#256
256: Chaining Iterators with chain()
#256
256: Memoization — Fibonacci with Hashtable Cache
#257
257: Pairing Elements with zip()
#257
257: State Machine — Turnstile
#258
258: Index-Value Pairs with enumerate()
#258
258: Monadic Option Chaining
#259
259: Flattening with flat_map()
#259
259: Result Monad — Error Chaining
#260
260: Functor Comparable Set
#260
260: Stateful Accumulation with scan()
#261
261: Binary Search Tree — Insert and Search
#261
261: Lookahead with Peekable
#262
262: Sliding Windows over Slices
#262
262: Rose Tree — Multi-Way Tree with Fold
#263
263: AVL Tree
#263
263: Fixed-Size Chunks Iteration
#264
264: Conditional Stopping with take_while()
#264
264: String Anagram Check
#265
265: Caesar Cipher
#265
265: Conditional Skipping with skip_while()
#266
266: Iterator step_by()
#267
267: Infinite Cycling with cycle()
#268
268: Splitting Pairs with unzip()
#269
269: Splitting by Predicate with partition()
#270
270: Finding Index with position()
#271
271: Transform-and-Find with find_map()
#271
Sublist Classification
#272
272: One-Level Flattening with flatten()
#272
Tree Zipper
#273
Fibonacci Variants
#273
273: Iterator inspect()
#274
Binary ↔ Decimal Fold
#274
274: Numeric Reductions: sum() and product()
#275
275: Iterator min() and max()
#275
Yacht Dice Scoring
#276
276: Iterator min_by() and max_by()
#276
Parallel Letter Frequency
#277
Circular Buffer — Functional Queue
#277
277: Iterator count()
#278
278: Iterator last()
#278
Sierpinski Triangle — Recursive ASCII Art
#279
279: Iterator nth()
#279
Pascal's Triangle — Row Generation
#280
Hamming Distance — Generic Zip
#280
280: Iterator any() and all()
#281
281: Implementing Iterator Trait from Scratch
#282
282: DoubleEndedIterator
#283
283: ExactSizeIterator
#284
284: FusedIterator
#285
285: Building Custom Iterator Adapters
#286
286: Creating Iterators with from_fn()
#287
287: Recursive Sequences with successors()
#288
288: Iterator collect()
#289
289: Extending Collections with extend()
#290
290: Advanced Splitting Patterns
#291
291: Result Combinators
#292
292: Option Combinators
#293
293: The ? Operator
#294
294: Custom Error Types
#295
295: Implementing std::error::Error
#296
296: From Trait for Error Conversion
#297
297: The thiserror Pattern
#298
298: The anyhow Pattern — Boxed Errors
#299
299: Adding Context to Errors
#300
300: Chaining Errors with source()
#301
301: Result::transpose() — Flipping Nested Types
#302
302: Option::transpose() — Collecting Optional Results
#303
303: Collecting Iterator> into Result>
#304
304: Splitting Ok/Err with partition()
#305
305: unwrap_or, unwrap_or_else, unwrap_or_default
#306
306: ok_or and ok_or_else
#307
307: Error Propagation in Closures
#308
308: When to panic vs Return Result
#309
309: The Never Type (!)
#310
310: Infallible Conversions
#311
311: Handling Multiple Error Types
#312
312: Error Downcasting
#313
313: The Try Trait — What ? Actually Does
#314
314: Validated — Accumulating All Errors
#315
315: Result ok() and err() Methods
#316
316: std::io::Error Patterns
#317
317: Parse Error Handling
#318
318: Display vs Debug for Errors
#319
319: Error Handling in Tests
#320
320: Fallible Iterators
#321
321: async fn and .await Fundamentals
#322
322: The Future Trait and Poll
#323
323: async blocks and Lazy Evaluation
#324
324: Running Futures Concurrently with join!
#325
325: Racing Futures with select!
#326
326: Capturing with async move
#327
327: Spawning Concurrent Tasks
#328
328: Async Channels (mpsc)
#329
329: Async Streams
#330
330: Async Sink
#331
331: Timeouts with time::timeout
#332
332: Retry Async
#333
333: Async Recursion
#334
334: Pin and Unpin
#335
335: Waker and Context
#336
336: Executor Basics
#337
337: Async Mutex
#338
338: Async RwLock
#339
339: Semaphore Async
#340
340: Async Trait Pattern
#341
341: Buffered Stream
#341
341: MPSC Channel
#342
342: Arc> Pattern
#342
342: Async Io
#343
343: Cancellation Token
#343
343: Producer-Consumer Pattern
#344
344: Structured Concurrency
#345
345: Async Cleanup and Drop
#346
346: Runtime Context
#347
347: Blocking in Async
#348
348: Async Generator Pattern
#349
349: Broadcast Channel
#350
350: Oneshot Channel
#351
351: BTreeMap — Ordered Key-Value Storage
#352
352: BTreeSet — Sorted Unique Values
#353
353: VecDeque — Double-Ended Queue
#354
354: BinaryHeap — Priority Queue
#355
355: Linked List in Rust
#356
356: Advanced HashMap Patterns
#357
357: Entry API — Insert or Update Without Double Lookup
#358
358: Insertion-Order Maps (IndexMap Pattern)
#359
359: Multimap Pattern
#360
360: Bitset Pattern — Bitmask as Dense Boolean Set
#361
361: Rope for Efficient String Operations
#362
362: Trie — Prefix Tree for String Lookups
#363
363: Arena / Bump Allocation Pattern
#364
364: Slab Pattern for Indexed Storage
#365
365: Union-Find — Disjoint Set Forest
#366
366: Segment Tree — O(log n) Range Queries
#367
367: Fenwick Tree — Efficient Prefix Sums
#368
368: Persistent Data Structures
#369
369: Cow Clone-on-Write
#370
370: SmallVec / Inline Storage Optimization
#371
371: Circular Buffer / Ring Buffer
#372
372: Skip List Concept in Rust
#373
373: Custom B-Tree Implementation
#374
374: Radix Tree / Patricia Trie
#375
375: LRU Cache — Evict the Least Recently Used
#376
376: Probabilistic Bloom Filter
#377
377: Graph as Adjacency List
#378
378: Graph as Adjacency Matrix
#379
379: DAG and Topological Sort
#380
380: Weighted Graph and Dijkstra
#381
381: Blanket Implementations
#382
382: Associated Types vs Type Parameters
#383
383: Simulating Higher-Kinded Types with GATs
#384
384: dyn Trait and Fat Pointers
#385
385: Any Trait for Runtime Type Info
#386
386: Object-Safe Traits
#387
387: Sealed Trait Pattern
#388
388: Extension Trait Pattern
#389
389: Newtype Pattern
#390
390: Type Alias impl Trait (TAIT)
#391
391: impl Trait in Return Position
#392
392: impl Trait in Argument Position
#393
393: Complex Where Clause Bounds
#394
394: Supertrait Pattern
#395
395: Default Methods
#396
396: Simulating Trait Specialization
#397
397: Marker Traits
#398
398: Auto Traits and Negative Impls
#399
399: Coherence and Orphan Rules
#400
400: Static vs Dynamic Dispatch
#401
401: Deref and Deref Coercions
#402
402: Index and IndexMut Traits
#403
403: Display, Debug, and Formatting
#404
404: From, Into, TryFrom, TryInto
#405
405: Iterator Adapters and Combinators
#406
406: Hash, Eq, and Ord Traits
#407
407: Default Trait and Initialization
#408
408: Clone vs Copy Semantics
#409
409: Drop Trait and RAII
#410
410: Arithmetic Operator Overloading
#411
411: macro_rules! Declarative Macros
#412
412: Macro Repetition Patterns
#413
413: Macro Fragment Specifiers
#414
414: Recursive Macro Patterns
#415
415: Token Tree Munching
#416
416: Builder Pattern via Macro
#417
417: Implementing vec!-like Macros
#418
418: stringify! and concat!
#419
419: cfg! and cfg_attr for Conditional Code
#420
420: env! and option_env! for Build-time Values
#421
421: include! and include_str!
#422
422: Derive Macros: Concept and Usage
#423
423: Procedural Macros Overview
#424
424: Custom #[derive(MyTrait)]
#425
425: Attribute Macros #[my_attr]
#426
426: Function-like Proc Macros
#427
427: syn + quote for Proc Macro AST
#428
428: Macro Hygiene Rules
#429
429: Macro Scoping and #[macro_export]
#430
430: Debugging Macros with cargo expand
#431
431: Counting Elements at Compile Time
#432
432: enum_dispatch via Macros
#433
433: State Machine via Macro
#434
434: DSL Design with Macros
#435
435: lazy_static! / OnceLock Pattern
#436
436: Deriving Traits for Newtypes
#437
437: Test Helper Macros
#438
438: format_args! for Zero-Alloc Formatting
#439
439: assert_matches! and Variant Assertions
#440
440: Logging Macros Pattern
#441
441: Thread Basics — Spawn and Join
#442
442: Scoped Threads — Borrow Stack Data Across Threads
#443
443: Arc> — Shared Mutable State Across Threads
#444
444: Arc> — Multiple Readers, One Writer
#445
445: MPSC Channels — Message Passing Between Threads
#446
446: Thread Pool — Reuse Threads for Amortised Concurrency
#447
447: Work-Stealing Pattern
#448
448: Rayon Parallel Iterators
#449
449: rayon::join for Parallel Tasks
#450
450: Crossbeam Channels
#451
451: Crossbeam select!
#452
452: Atomic Types — Lock-Free Operations on Single Values
#453
453: Memory Ordering — Acquire, Release, SeqCst
#454
454: Compare-and-Swap — Atomic Conditional Updates
#455
455: Lock-Free Stack — Concurrent Push/Pop Without Mutex
#456
456: OnceLock — Initialize a Global Exactly Once
#457
457: Condvar — Sleep Until a Condition Is True
#458
458: Barrier — Rendezvous All Threads Before Proceeding
#459
459: Thread-Local Storage — Per-Thread Private State
#460
460: Send + Sync — Compile-Time Thread Safety Proofs
#461
461: Producer-Consumer Pattern
#462
462: Pipeline Concurrency
#463
463: Fan-Out / Fan-In
#464
464: Actor Pattern
#465
465: Message Passing vs Shared Memory
#466
466: Concurrent HashMap
#467
467: Epoch-Based Garbage Collection
#468
468: Lock-Free Queue
#469
469: Parallel Fold/Reduce
#470
470: Concurrent B-tree
#471
471: String vs &str
#472
472: String Slices and Byte Boundaries
#473
473: FromStr and parse()
#474
474: format!, write!, writeln!
#475
475: String Building Patterns
#476
476: split(), splitn(), split_once()
#477
477: trim(), trim_start(), trim_end()
#478
478: contains(), find(), starts_with()
#479
479: replace(), replacen()
#480
480: chars() and Char-Level Operations
#481
481: bytes() and Byte-Level Operations
#482
482: Unicode Normalization and Graphemes
#483
483: UTF-8 Encoding Patterns
#484
484: Cow for Flexible Strings
#485
485: Efficient String Concatenation
#486
486: Regex-Like Matching Without Crates
#487
487: String Interning
#488
488: Owning References with Rc\
#489
489: Arc\ for Shared Strings
#490
490: Fixed-Size String Arrays
#491
491: Path and PathBuf Handling
#492
492: OsStr and OsString
#493
493: CString and CStr for FFI
#494
494: Number ↔ String Conversion
#495
495: String Template Pattern
#496
496: String Diff / Edit Distance
#497
497: Case Conversion Patterns
#498
498: Safe Unicode Truncation
#499
499: Escaping and Unescaping Strings
#500
500: String Compression (Run-Length Encoding)
#501
501: Closure Capture Rules
#502
502: Fn, FnMut, FnOnce Hierarchy
#503
503: Closure as Argument
#504
504: Returning Closures from Functions
#505
505: Boxing Closures — Box\
#506
506: Move Closures and Ownership
#507
507: Closure Memoization
#508
508: Partial Application with Closures
#509
509: Closure Composition
#510
510: Currying Pattern in Rust
#511
511: Recursive Closures (Y Combinator)
#512
512: Closures as State Machine Transitions
#513
513: Strategy Pattern via Closures
#514
514: Observer/Callback Pattern
#515
515: Lazy Evaluation with OnceLock
#516
516: Complex Closure Environments
#517
517: Closure-to-fn-pointer Coercion
#518
518: Function Pointers vs Closures
#519
519: Closure Type Inference
#520
520: Higher-Order Functions
#521
521: Map-Reduce with Closures
#522
522: Predicate Functions Pattern
#523
523: Event Handler Pattern
#524
524: Builder Pattern with Closures
#525
525: Tap Pattern for Side Effects
#526
526: Pipe Operator Simulation
#527
527: FnOnce — Consuming Closures
#528
528: Closures Capturing References
#529
529: Async Closures
#530
530: Closures in Benchmarking
#531
531: Lifetime Annotations — 'a Basics
#532
532: Multiple Lifetime Parameters
#533
533: Lifetimes in Structs
#534
534: Lifetimes in impl Blocks
#535
535: Lifetimes in Enums
#536
536: 'static Lifetime
#537
537: Lifetime Coercion and Subtyping
#538
538: Variance — Covariant, Contravariant, Invariant
#539
539: Non-Lexical Lifetimes (NLL)
#540
540: Borrow Checker Internals
#541
541: Lifetime Elision Rules
#542
542: Higher-Ranked Trait Bounds (for<'a>)
#543
543: Lifetimes in dyn Trait
#544
544: Lifetimes in Closures
#545
545: Split Borrows from Structs
#546
546: Reborrowing Patterns
#547
547: Polonius Borrow Checker Concepts
#548
548: Named Lifetime in Return Types
#549
549: PhantomData for Lifetime Variance
#550
550: Interior Mutability — Cell and RefCell
#551
551: Rc and Weak for Cycles
#552
552: Arena with Lifetimes
#553
553: Self-Referential Structs (Pin)
#554
554: Safe Transmute with Lifetimes
#555
555: Owning References Pattern
#556
556: Rental / Self-Referential Pattern
#557
557: Output Lifetimes in Traits
#558
558: Input Lifetimes Guide
#559
559: Region Inference Basics
#560
560: Lifetime Annotation Cheatsheet
#561
561: Or-Patterns — pat1 | pat2
#562
562: Match Guards with if Conditions
#563
563: Struct Destructuring
#564
564: Enum Variant Matching
#565
565: Tuple Struct Patterns
#566
566: Nested Pattern Matching
#567
567: Binding Modes: ref, ref mut
#568
568: @ Bindings in Patterns
#569
569: Range Patterns: 1..=10
#570
570: Slice Patterns: [first, rest @ ..]
#571
571: `..` and `_` Wildcards
#572
572: ref Patterns and &
#573
573: let-else for Early Return
#574
574: if let and while let
#575
575: let Chains (&&)
#576
576: `matches!` Macro
#577
577: Irrefutable vs Refutable Patterns
#578
578: Exhaustive Matching with _
#579
579: String/str Pattern Matching
#580
580: Option Matching Idioms
#581
581: Result Matching Idioms
#582
582: Tuple Pattern Matching
#583
583: Const in Patterns
#584
584: Type Patterns and `as`
#585
585: Box Deref Patterns
#586
586: Consolidating Match Arms
#587
587: Visitor Pattern via Match
#588
588: Finite Automata with Match
#589
589: Command Dispatch with Enums
#590
590: Advanced Enum Pattern Cookbook
#591
591: Builder Pattern (Functional Style)
#592
592: Command Pattern as Data
#593
593: Interpreter Pattern
#594
594: Continuation-Passing Style (CPS)
#595
595: Trampoline Pattern
#596
596: Church Encoding in Rust
#597
597: Scott Encoding for Algebraic Types
#598
598: Finally Tagless Style
#599
599: Free Monad Interpretation
#600
600: Simulating Algebraic Effects
#601
601: Coproduct / Sum Types
#602
602: Product Types (Advanced)
#603
603: Functor Laws in Practice
#604
604: Monad Laws — Rust Deep Dive
#605
605: Applicative Functor Laws
#606
606: Natural Transformations in Rust
#607
607: Fixed-Point Types and Recursion Schemes
#608
608: Catamorphism (Fold) Generalized
#609
609: Anamorphism (Unfold) Generalized
#610
610: Hylomorphism — Unfold Then Fold
#611
611: Paramorphism
#612
612: Zygomorphism
#613
613: Futumorphism
#614
614: Histomorphism
#615
615: Optics Intro — Lenses, Prisms, and the Hierarchy
#616
616: Lens Pattern — Composable Getters and Setters
#617
617: Prism Pattern — Fallible Access for Enum Variants
#618
618: Traversal for Collection Optics
#619
619: Isomorphism (Iso)
#620
620: Affine Traversal (Optional Lens)
#621
621: Profunctor Encoding of Optics
#622
622: Classy Optics (Typeclass-Style)
#623
623: Grand Tour — Functional Programming Patterns in Production Rust
#699
699: Raw Pointer Basics
#700
700: Unsafe Block
#701
701: Unsafe Functions
#702
702: Unsafe Traits
#703
703: Raw Pointer Arithmetic
#704
704: Dereferencing Raw Pointers Safely
#705
705: Null Pointer Handling with NonNull
#706
706: UnsafeCell — The Foundation of Interior Mutability
#707
707: `std::mem::transmute` — Reinterpreting Bytes
#708
708: Safe Transmute Patterns and Alternatives
#709
709: Unions in Rust
#710
710: Calling C Functions with `extern "C"`
#711
711: #[no_mangle] Exporting Rust Functions to C
#712
712: String/CString/CStr Conversion for FFI
#713
713: `#[repr(C)]` Structs for FFI Interop
#714
714: FFI Callbacks — Passing Rust Functions to C
#715
715: FFI Error Codes — Converting C Errors to Rust Result
#716
716: Custom Global Allocator with #[global_allocator]
#717
717: Volatile Memory Reads and Writes
#718
718: Soundness, Undefined Behaviour, and Safety Invariants
#719
719: Struct of Arrays vs Array of Structs
#720
720: Cache-Friendly Iteration and Data Access Patterns
#721
721: `MaybeUninit` — Safe Uninitialized Memory
#722
722: Memory Layout — repr(C), repr(packed), repr(align(N))
#723
723: Branchless Programming
#724
724: Zero-Copy Parsing with Byte Slices
#725
725: Stack Allocation Patterns
#726
726: Memory Pool / Bump Allocator Pattern
#727
727: SIMD Portable Concepts with std::simd
#728
728: Inline Hints — #[inline], #[cold], #[target_feature]
#729
729: Avoid Allocations
#730
730: Small String Optimization
#731
731: Tiered Memory Strategy
#732
732: Benchmarking Harness
#733
733: Profile-Guided Patterns
#734
734: Typestate Pattern: Encode State in the Type
#735
735: Typestate Builder: Required Fields at Compile Time
#736
736: Typestate Connection
#737
737: File Handle Typestate: Open/Closed/ReadOnly
#738
738: PhantomData: Phantom Types and Type Markers
#739
739: Phantom Units of Measure
#740
740: PhantomData for Variance Control
#741
741: Parse-Don't-Validate: Rich Types Over Runtime Checks
#742
742: Type Witnesses and Evidence Passing
#743
743: Session Types: Protocol Safety via Types
#744
744: Unit Test Organisation: Modules, Helpers, AAA Pattern
#745
745: Integration Test Structure: tests/ Directory
#746
746: Documentation Tests: rustdoc Examples
#747
747: Test Fixtures: Setup/Teardown, Shared State
#748
748: Property-Based Testing (proptest Pattern)
#749
749: Fuzzing Concepts: cargo fuzz Approach
#750
750: Snapshot Testing: Expect Files Pattern
#751
751: Mocking via Traits: Test Doubles in Rust
#752
752: Stubs, Mocks, Fakes, Spies Taxonomy
#753
753: Benchmark Harness: Measuring Hot Functions
#754
754: Testing Async Functions Conceptually
#755
755: Testing Error Cases and Unwrap Discipline
#756
756: Testing with Temporary Files and Directories
#757
757: Golden File Testing Pattern
#758
758: Test Isolation: Avoiding Shared Mutable State
#759
759: Manual Serialize/Deserialize Trait Implementation
#760
760: Derive-Based Serialization: How derive(Serialize) Works
#761
761: Custom Serialization for Complex Types
#762
762: Custom Deserialization with Visitor Pattern
#763
763: JSON-Like Format Built From Scratch
#764
764: Binary Serialization: Length-Prefixed Records
#765
765: CSV Parsing Without External Crates
#766
766: Config File Parsing (INI/TOML-Like)
#767
767: Versioned Serialization with Migration
#768
768: Zero-Copy Deserialisation with Lifetime Tricks
#769
769: Streaming Parser for Large Inputs
#770
770: Recursive Descent Parser from Scratch
#771
771: Pratt Parser for Operator Precedence Expressions
#772
772: Parser Combinator Pattern (nom-Style)
#773
773: Serde Attributes: rename, skip, flatten Patterns
#774
774: Const Generics: fn Fundamentals
#775
775: Fixed-Size Arrays with const N Parameter
#776
776: const fn: Compile-Time Computation
#777
777: Compile-Time Assertions with const
#778
778: Fibonacci Computed at Compile Time
#779
779: Compile-Time Lookup Tables with const Arrays
#780
780: Generic Structs Parameterised by const
#781
781: Where Bounds on const Generic Parameters
#782
782: const eval: Limitations and Workarounds
#783
783: Type-Level Arithmetic with const Generics
#784
Fibonacci: Memoisation vs Tabulation DP
#785
0/1 Knapsack: DP Table Approach
#786
LCS: Classic DP with Backtracking
#787
Edit Distance (Levenshtein) DP
#788
Coin Change: Minimum Coins DP
#789
Longest Increasing Subsequence
#790
790: Matrix Chain Multiplication
#791
791: Palindrome Partitioning
#792
792: Rod Cutting Problem
#793
793: Minimum Path Sum in Grid
#794
Word Break (Dictionary DP)
#795
Subset Sum (DP with Bitset Optimisation)
#796
796: Counting Paths in Grid with Obstacles
#797
797: Range Minimum Query (Sparse Table)
#798
Kadane's Algorithm: Maximum Subarray Sum
#799
Bellman-Ford: Shortest Paths with Negative Edges
#800
Floyd-Warshall: All-Pairs Shortest Paths
#801
Prim's Algorithm: Minimum Spanning Tree
#802
Kruskal's MST with Union-Find
#803
A* Pathfinding with Manhattan Heuristic
#804
Tarjan's Strongly Connected Components
#805
805: Kosaraju's Two-Pass SCC Algorithm
#806
806: Articulation Points and Bridges
#807
807: Bipartite Graph Detection (2-Colouring)
#808
DFS-Based Topological Sort
#809
Max Flow: Ford-Fulkerson with BFS (Edmonds-Karp)
#810
Eulerian Path and Circuit (Hierholzer's Algorithm)
#811
811: Hamiltonian Cycle via Backtracking
#812
Graph m-Colouring with Backtracking
#813
813: Minimum Vertex Cover (2-Approximation)
#814
814: KMP — Knuth-Morris-Pratt Pattern Matching
#815
815: Boyer-Moore-Horspool String Search
#816
816: Rabin-Karp Rolling Hash Search
#817
817: Aho-Corasick Multi-Pattern Matching Automaton
#818
818: Suffix Array Construction O(n log n)
#819
819: Z-Algorithm
#820
820: Manacher's Algorithm
#821
821: Trie for Autocomplete and Prefix Search
#822
822: Burrows-Wheeler Transform
#823
823: Polynomial Rolling Hash
#824
824: Sieve of Eratosthenes
#825
825: Prime Factorization
#826
826: GCD, LCM, and the Euclidean Algorithm
#827
827: Modular Arithmetic
#828
828: Fast Modular Exponentiation
#829
829: Chinese Remainder Theorem
#830
830: Euler's Totient Function φ(n)
#831
831: Miller-Rabin Probabilistic Primality Test
#832
832: Extended Euclidean Algorithm
#833
833: Discrete Logarithm — Baby-Step Giant-Step
#834
834: Convex Hull — Graham Scan
#835
835: Point-in-Polygon — Ray Casting
#836
836: Line Segment Intersection Detection
#837
837: Closest Pair of Points — Divide and Conquer
#838
838: Interval Tree for Stabbing Queries
#839
839: Sweep Line Algorithm with Event Queue
#840
840: Divide and Conquer — Generic Recursive Framework
#841
841: Backtracking — Generic Recursive Framework with Pruning
#842
842: Branch and Bound — TSP Optimisation
#843
843: Generic Memoization with HashMap Cache
#844
844: Greedy Algorithm Patterns — Activity Selection and Huffman Coding
#845
845: Randomized Quickselect
#846
846: Monte Carlo Methods — π Estimation and Sampling
#847
847: Approximation Algorithms — Greedy Set Cover
#848
848: Big-O Reasoning and Complexity Analysis in Rust
#849
001: Higher-Order Functions
#850
051: Functors Introduction
#851
052: Functor Laws
#852
053: Applicative Functor Basics
#853
054: Applicative Validation
#854
055: Option Monad
#855
056: Result Monad
#856
057: Monad Laws
#857
058: FlatMap/Bind Chains
#858
059: Kleisli Composition
#859
060: State Monad
#860
061: Reader Monad
#861
062: Writer Monad
#862
063: Monad Transformers
#863
064: Traverse with Option
#864
065: Traverse with Result
#865
066: Sequence Monadic
#866
067: Foldable Trait
#867
068: Foldable Tree
#868
069: Traversable Tree
#869
070: Continuation Monad
#870
076: Trait Objects
#871
077: Generic Bounds
#872
078: Where Clauses
#873
079: Associated Types
#874
080: Phantom Types
#875
081: Newtype Pattern
#876
082: Type Aliases
#877
083: Display Trait
#878
084: From/Into Traits
#879
085: Iterator Trait
#880
086: Custom Iterators
#881
087: Iterator Adapters
#882
088: Iterator Consumers
#883
089: Lazy Sequences
#884
090: Infinite Iterators
#885
091: Zip and Unzip
#886
092: Scan / Accumulate
#887
093: Windows and Chunks
#888
094: Peekable Iterator
#889
095: DoubleEndedIterator
#890
096: ExactSizeIterator
#891
097: Flatten Iterator
#892
098: Partition Iterator
#893
099: Group By Iterator
#894
100: Step By, Enumerate, Rev
#895
101: Move Semantics
#896
102: Clone and Copy
#897
103: Shared References (&T)
#898
104: Mutable References (&mut T)
#899
105: Lifetime Basics
#900
256: Chaining Iterators with chain()
#901
257: Pairing Elements with zip()
#902
258: Index-Value Pairs with enumerate()
#903
259: Flattening with flat_map()
#904
260: Stateful Accumulation with scan()
#905
261: Lookahead with Peekable
#906
262: Sliding Windows over Slices
#907
263: Fixed-Size Chunks Iteration
#908
264: Conditional Stopping with take_while()
#909
265: Conditional Skipping with skip_while()
#910
271: Transform-and-Find with find_map()
#911
272: One-Level Flattening with flatten()
#912
273: Iterator inspect()
#913
274: Numeric Reductions: sum() and product()
#914
275: Iterator min() and max()
#915
276: Iterator min_by() and max_by()
#916
277: Iterator count()
#917
278: Iterator last()
#918
279: Iterator nth()
#919
280: Iterator any() and all()
#920
341: Buffered Concurrent Stream Processing
#921
342: Async File and Network I/O
#922
343: Cancellation Token
#923
923: Thread Pool
#924
924: Work Stealing
#925
List Operations
#926
003: Pattern Matching
#927
004: Option and Result
#928
005: Reverse a List
#929
006: Palindrome Check
#930
061: Pangram Check
#931
Records — Immutable Update and Pattern Matching
#932
Stack Module with Signature
#933
064: Map.Make Functor — String→Int Dictionary
#934
065: Church Numerals
#935
066: Tree Map and Fold
#936
067: Mutual Recursion
#937
068: Tail-Recursive Accumulator
#938
069: Unfold
#939
070: Scan Left
#940
071: GCD and LCM
#941
071: Identity Monad
#942
072: Matrix Operations
#943
Result Type — Railway-Oriented Error Handling
#944
073: Validated Type — Smart Constructors
#945
073: Word Count with Map
#946
074 — Catamorphism
#947
074: Currying and Partial Application
#948
075: Merge Sort — Functional Divide and Conquer
#949
075: Profunctor — Contramap Input, Map Output
#950
Sum of Multiples
#951
Series — Sliding Window
#952
Atbash Cipher
#953
Poker Hand Evaluator
#954
090: Perfect Numbers — Classification
#955
955: JSON Value Type
#956
956: JSON Pretty Print
#957
957: JSON Query by Path
#958
958: CSV Parser
#959
959: CSV Writer
#960
960: Key-Value Store
#961
961: LRU Cache
#962
962: Trie Map
#963
963: Bloom Filter
#964
964: Union-Find / Disjoint Set
#965
965: Segment Tree
#966
966: Fenwick Tree (BIT)
#967
967: Priority Queue
#968
968: Double-Ended Queue (Deque)
#969
969: Circular Buffer
#970
970: Rope String
#971
971: Persistent List
#972
972: Persistent Binary Search Tree
#973
973: Finger Tree
#974
974: Skip List
#975
975: Sparse Matrix
#976
976: Matrix Multiply
#977
977: Bitset
#978
978: Count-Min Sketch
#979
979: Future/Promise Basics
#980
980: Map over Async
#981
981: Sequential Async Chain
#982
982: Join Parallel Async
#983
983: MPSC Channel Basics
#984
984: Channel Pipeline
#985
985: Select Pattern
#986
986: Mutex-Protected State
#987
987: Read-Write Lock Pattern
#988
988: Thread-Local Storage
#989
989: One-Time Initialization
#990
990: Semaphore
#991
991: Barrier Synchronization
#992
992: Actor Pattern
#993
993: Thread Pool / Work Queue
#994
994: MapReduce
#995
995: N-Stage Streaming Pipeline
#996
996: Timeout Pattern
#997
997: Retry with Exponential Backoff
#998
998: Circuit Breaker
#999
999: Rate Limiter — Token Bucket
#1000
1000: Reactive Stream
#1001
1001: Simple Event Loop
#1002
1002: Backpressure
#1003
1003: Custom Error Types
#1004
1004: Error Conversion
#1005
1005: Error Chaining
#1006
1006: Multiple Error Types
#1007
1007: Result Combinators
#1008
1008: Option to Result Conversion
#1009
1009: Collecting Results
#1010
1010: Partition Results
#1011
1011: The ? (Try) Operator
#1012
1012: The Never Type (!)
#1013
1013: Panic vs Result
#1014
1014: Recover from Panic
#1015
1015: Validation Errors
#1016
1016: Error Context
#1017
1017: Typed Error Hierarchy
#1018
1018: Error Downcast
#1019
1019: Fallible Iterator
#1020
1020: try_fold
#1021
1021: Error Propagation Depth
#1022
1022: Sentinel Values vs Result
#1023
1023: Safe Integer Parsing
#1024
1024: File Operation Errors
#1025
1025: Network Error Classification
#1026
1026: Custom Error Display
#1027
1027: BTreeMap — Sorted Key Iteration
#1028
1028: BTreeSet — Union, Intersection, Difference
#1029
1029: HashMap Entry API
#1030
1030: Group Elements by Key
#1031
1031: Count Frequencies
#1032
1032: VecDeque Rotation
#1033
1033: Top-K Elements with BinaryHeap
#1034
1034: Safe Linked List
#1035
1035: Doubly-Linked List
#1036
1036: Graph with Arena Allocation
#1037
1037: Adjacency List Graph
#1038
1038: Adjacency Matrix
#1039
1039: Stack Using Vec
#1040
1040: Queue Using VecDeque
#1041
1041: Multimap
#1042
1042: Bidirectional Map
#1043
1043: Interval Map
#1044
1044: Sorted Vec
#1045
1045: Small Vector Optimization
#1046
1046: Clone-on-Write Collections
#1047
1047: Flat Binary Tree in Vec
#1048
1048: Vec Zipper
#1049
1049: Persistent HashMap
#1050
1050: String Interning
#1051
1051: Fibonacci with HashMap Memoization
#1052
1052: Fibonacci Bottom-Up DP
#1053
1053: Coin Change
#1054
1054: 0/1 Knapsack
#1055
1055: Longest Common Subsequence
#1056
1056: Edit Distance (Levenshtein)
#1057
1057: Matrix Chain Multiplication
#1058
1058: Longest Increasing Subsequence
#1059
1059: Rod Cutting
#1060
1060: Partition Equal Subset Sum
#1061
1061: Word Break
#1062
1062: N-Queens
#1063
1063: Sudoku Solver
#1064
1064: Permutations
#1065
1065: Combination Sum
#1066
1066: All Subsets (Power Set)
#1067
1067: Phone Keypad Letter Combinations
#1068
1068: Maze Solver
#1069
1069: Graph Coloring
#1070
1070: Hamiltonian Path
#1071
1071: Regex Matching
#1072
1072: Wildcard Matching
#1073
1073: Burst Balloons
#1074
1074: Egg Drop
#1075
1075: Stone Game
#1076
Y Combinator — Anonymous Recursion
#1077
Phantom Type State Machine — File Handle
#1078
Visitor Pattern via Fold — Expression Evaluator
#1079
Writer Monad — Logging Computation
#1080
Topological Sort via Kahn's Algorithm
#1081
Lenses
#1082
Tail-Recursive Map with CPS
#1083
Red-Black Tree
#1085
1085 — Dijkstra's Shortest Path