1. The Zylisp Guide
  2. Title Page
  3. Copyright
  4. About the Cover
  5. Dedication
  6. Preface
  7. Forward
  8. Acknowledgments
  9. Part I: Getting Started with Zylisp
  10. Introduction
    1. Why Zylisp?
    2. Origins
      1. ZetaLisp
      2. Erlang
      3. Clojure
      4. LFE
      5. Go
    3. The Zylisp Project
      1. Code Repositories
      2. How It All Fits Together
      3. Contributing
    4. Book Organisation
  11. Welcome to Zylisp
    1. Hello, World
    2. The REPL
    3. Setting Up Your Environment
  12. A Tour of Zylisp
    1. Command-Line Arguments
    2. Finding Duplicate Lines
    3. A Web Server
    4. Concurrent URL Fetching
    5. Loose Ends
  13. Part II: Zylisp Fundamentals
  14. Program Structure
    1. Expressions and S-Expressions
    2. Definitions and Declarations
    3. Names and Naming Conventions
    4. Scope and Visibility
    5. Packages and Files
    6. Comments and Documentation
  15. Basic Data Types
    1. Numbers
    2. Booleans
    3. Strings and Runes
    4. Constants
    5. Type Declarations
  16. Functions
    1. Function Declarations
    2. Parameters and Arguments
    3. Multiple Return Values
    4. Recursion
    5. Anonymous Functions and Closures
    6. Variadic Functions
    7. Higher-Order Functions
    8. Error Handling
  17. Part III: Immutable Data Structures
  18. Lists and Sequences
    1. The List: Lisp's Fundamental Structure
    2. List Operations
    3. Immutability Guarantees
    4. Sharing and Structural Sharing
    5. List Comprehensions
  19. Composite Types
    1. Vectors (Immutable Arrays)
    2. Maps (Immutable Hash Tables)
    3. Sets
    4. Records
    5. Working with Immutable Data
  20. Pattern Matching
    1. Introduction to Pattern Matching
    2. Basic Patterns
    3. Destructuring
    4. Guards and Conditionals
    5. Pattern Matching in Function Parameters
    6. Advanced Patterns
    7. Implementation Notes
  21. Part IV: Types and Abstraction
  22. The Type System
    1. Type Annotations
    2. Type Inference
    3. Basic Type Checking
    4. Function Types
    5. Parametric Polymorphism
    6. Type Aliases vs New Types
    7. The Unit Type and Void
  23. Structs and Records
    1. Defining Structs
    2. Field Access and Updates
    3. Struct Embedding
    4. Struct Patterns in Matching
    5. Immutable Structs by Default
  24. Methods
    1. Method Declarations
    2. Receiver Types
    3. Value Receivers
    4. Method Sets
    5. Composing Types with Embedding
    6. Encapsulation
  25. Part V: Interfaces and Protocols
  26. Interfaces
    1. Interfaces as Contracts
    2. Defining Interfaces
    3. Interface Satisfaction
    4. The Empty Interface
    5. Type Assertions
    6. Type Switches
    7. Interface Composition
  27. Common Interfaces
    1. String Conversion
    2. Error Handling Interface
    3. Comparison and Ordering
    4. Iteration Protocols
    5. I/O Interfaces
  28. Part VI: Concurrency (The Go Way in Lisp)
  29. Goroutines
    1. What Are Goroutines?
    2. Creating Goroutines
    3. Goroutine Lifecycle
    4. Goroutines vs OS Threads
    5. Example: Concurrent Server
  30. Channels
    1. Channel Basics
    2. Creating Channels
    3. Sending and Receiving
    4. Buffered vs Unbuffered Channels
    5. Channel Direction
    6. Closing Channels
    7. Range over Channels
  31. Concurrency Patterns
    1. Select Expression
    2. Timeouts
    3. Non-Blocking Operations
    4. Pipelines
    5. Fan-Out, Fan-In
    6. Cancellation
    7. Context
  32. Synchronization
    1. When to Use Synchronization
    2. Mutexes
    3. Read-Write Locks
    4. Atomic Operations
    5. The Race Detector
    6. Immutability as Synchronization
  33. Part VII: Organizing Code
  34. Modules and Packages
    1. Package Structure
    2. Import Declarations
    3. Export and Visibility
    4. Package Initialization
    5. Internal Packages
    6. Versioning and Dependencies
  35. Testing
    1. Writing Tests
    2. Running Tests
    3. Test Coverage
    4. Benchmarks
    5. Example Functions
    6. Property-Based Testing
  36. Documentation
    1. Doc Comments
    2. Generating Documentation
    3. Examples in Documentation
    4. Package Documentation
  37. Part VIII: Advanced Features
  38. Macros
    1. What Are Macros?
    2. Defining Macros
    3. Quoting and Unquoting
    4. Hygiene and Symbol Capture
    5. Common Macro Patterns
    6. When to Use Macros
    7. Macro Debugging
  39. More Metaprogramming
    1. Code as Data, Data as Code
    2. Compile-Time Evaluation
    3. Reader Macros
    4. Syntax Objects
    5. Building DSLs
  40. Reflection
    1. Type Reflection
    2. Value Inspection
    3. Struct Tags
    4. Dynamic Invocation
    5. When to Use Reflection
  41. Part IX: Interoperability and Performance
  42. Go Interoperability
    1. Calling Go Functions
    2. Using Go Packages
    3. Wrapping Go Types
    4. CGo Integration
    5. Performance Considerations
  43. Performance
    1. Profiling Zylisp Programs
    2. Memory Management
    3. Immutable Data Performance
    4. Optimization Techniques
    5. When to Drop to Go
  44. Unsafe Operations
    1. The unsafe Package
    2. Mutable Operations
    3. Raw Pointers
    4. When Unsafe is Justified
  45. Appendices
  46. Appendix I: Syntax Reference
    1. S-Expression Grammar
    2. Special Forms
    3. Built-in Functions
    4. Reserved Words
  47. Appendix II: Standard Library Overview
    1. Core Functions
    2. Data Structure Libraries
    3. I/O and File System
    4. Networking
    5. Concurrency Utilities
    6. Testing Utilities
  48. Appendix III: Pattern Matching Reference
    1. Pattern Syntax
    2. Pattern Types
    3. Match Expression Forms
    4. Implementation Details
  49. Appendix IV: Type System Reference
    1. Type Syntax
    2. Type Inference Rules
    3. Subtyping Relations
    4. Generic Type Parameters
  50. Appendix V: Comparison with Other Lisps
    1. From Common Lisp
    2. From Scheme/Racket
    3. From Clojure
    4. From LFE
  51. Appendix VI: Comparison with Go
    1. Syntax Mapping
    2. Idiom Translation
    3. What's Different
    4. What's the Same