# Features - Advanced Functional Programming in Python

Documentation of MFN package's advanced features.

## 📚 Feature Index

### [1. Dunder Methods - Expressive Syntax](./01-dunder-methods.md)
Operator overloading for a fluid and natural API.

### [2. Collections ABC - Native Protocols](./02-collections-abc.md)
Python protocol compliance for native integration.

### [3. Descriptors - Declarative Attributes](./03-descriptors.md)
Reusable attribute validation and logic.

### [4. Generics & Typing - Type Safety](./04-generics-typing.md)
Generic functional types with mypy support.

### [5. Decorators - Metaprogramming](./05-decorators.md)
Chaining cross-cutting concerns elegantly.

### [6. Pattern Matching - Structured Matching](./06-pattern-matching.md)
Using Python 3.10+ `match/case`.

### [7. Context Managers - Resource Management](./07-context-managers.md)
Functional approach to resource management.

### [8. Protocols - Structural Duck Typing](./08-protocols.md)
Structural subtyping for polymorphism.

### [9. Dataclasses - Immutable Structures](./09-dataclasses.md)
Optimized data structures in one line.

### [10. Callable Objects - Higher-Order Functions](./10-callable-objects.md)
Functional objects with `__call__`.

### [11. Slots & Weakref - Performance](./11-slots-performance.md)
Memory optimization for small objects.

### [12. Async/Await - Async Functional](./12-async-await.md)
Composable async functional code.

### [13. Pipe/Flow - Natural Composition](./13-pipe-flow.md)
Intuitive function composition using pipe operators.

### [14. Lenses - Immutable Deep Updates](./14-lenses.md)
Update nested data structures immutably with path-based accessors.

### [15. Validation Builders - Declarative Validation](./15-validation-builders.md)
Build complex validation rules declaratively.

### [16. Partial Application - Easy Specialization](./16-partial-application.md)
Create specialized functions by fixing some arguments.

### [17. Side Effect Tracking - Explicit Effects](./17-side-effects.md)
Track and manage side effects explicitly.

### [18. Lazy Collections - Efficient Evaluation](./18-lazy-collections.md)
Process large datasets efficiently with lazy evaluation.

### [19. Result Combinators - Error Chains](./19-result-combinators.md)
Chain operations and handle errors gracefully.

### [20. Retry with Backoff - Resilience](./20-retry-backoff.md)
Automatic retry with exponential backoff for transient failures.

### [21. State Management - Immutable Updates](./21-state-management.md)
Manage application state with immutable updates.

### [22. Predicate Combinators - Logic Composition](./22-predicate-combinators.md)
Combine and compose logical predicates.

### [23. Data Transformation - ETL Pipelines](./23-data-transformation.md)
Build data transformation pipelines for ETL operations.

### [24. Async Helpers - Simplified Concurrency](./24-async-helpers.md)
Simplify async operations with concurrency helpers.

### [25. Immutable Collections - Safe Data](./25-immutable-collections.md)
Immutable collections with structural sharing.

### [26. Form/Schema Validation - Data Shape](./26-form-validation.md)
Validate form data and schemas with type checking.

### [27. Tree Operations - Hierarchical Data](./27-tree-operations.md)
Navigate and transform hierarchical data structures.

### [28. Cache/Memoization - Performance](./28-cache-memoization.md)
Cache function results for performance optimization.

### [29. Date/Time Helpers - Temporal Operations](./29-datetime-helpers.md)
Simplify date and time operations.

### [30. Test Builders - Property-Based Testing](./30-test-builders.md)
Generate test cases automatically with property-based testing.

### [31. Config Management - Configuration](./31-config-management.md)
Manage application configuration with type safety.

### [32. Logging/Tracing - Observability](./32-logging-tracing.md)
Add observability to code with logging and tracing.

---

## 🎯 DX Goals

- **Fluidity**: API that reads like natural language
- **Discoverability**: Natural autocompletion
- **Safety**: Static typing and runtime checks
- **Performance**: No unnecessary overhead
- **Pythonic**: Respects Python idioms

## 📊 Feature Categories

### Core Python Features (1-12)
Advanced Python language features for functional programming.

### Composition & Flow (13-16)
Function composition and transformation helpers.

### Error Handling & Resilience (17, 19-20)
Effect management, error handling, and retry mechanisms.

### Data Management (18, 23, 25-27)
Collections, transformations, and hierarchical data.

### State & Config (21, 31)
State management and configuration.

### Validation (15, 22, 26)
Predicates, validation builders, and schema validation.

### Performance & Testing (24, 28, 30)
Async helpers, caching, and test builders.

### Observability (29, 32)
DateTime helpers and logging/tracing.
