nw-fp-principles
SolidCore functional programming thinking patterns and type system foundations, language-agnostic
DevOps & Infrastructure 526 stars
55 forks Updated 1 weeks ago MIT
Install
Quality Score: 95/100
Stars 20%
Recency 20%
Frontmatter 20%
Documentation 15%
Issue Health 10%
License 10%
Description 5%
Skill Content
# FP Principles
Core functional programming thinking patterns. Language-agnostic.
Cross-references: [fp-domain-modeling](../nw-fp-domain-modeling/SKILL.md) | [fp-hexagonal-architecture](../nw-fp-hexagonal-architecture/SKILL.md) | [fp-algebra-driven-design](../nw-fp-algebra-driven-design/SKILL.md)
---
## 1. Higher-Order Functions as Problem Decomposition
[STARTER]
Three operations replace most loops:
| Operation | Purpose | Replaces |
|-----------|---------|----------|
| **Map** | Transform each element, preserve structure | Loop building new collection |
| **Filter** | Keep elements matching condition | Loop with conditional |
| **Fold** | Accumulate elements into single result | Loop with running total |
**When to use Map**: Transform every element without changing collection shape. Nested maps handle nested structures.
**When to use Filter**: Select elements without changing their values.
**When to use Fold**: Reduce collection to single value. Accumulator IS your state. Combining function IS your state transition. Folds make state machines explicit.
**Decision**: "Am I transforming, selecting, or accumulating?" Pick matching operation. If none fit, compose two.
**Why**: These operations communicate intent. Map says "same shape, different values." Fold says "many inputs, one output." Loops say nothing about intent until you read every line.
---
## 2. Type-Driven Design
[STARTER]
Write the type signature before implementation. The type tells you what the functi...
Details
- Author
- nWave-ai
- Repository
- nWave-ai/nWave
- Created
- 3 months ago
- Last Updated
- 1 weeks ago
- Language
- Python
- License
- MIT
Similar Skills
Semantically similar based on skill content — not just same category
Web & Frontend Solid
nw-fp-usable-design
Naming conventions, API ergonomics, and usability patterns for functional code
526 Updated 1 weeks ago
nWave-ai AI & Automation Solid
nw-fp-hexagonal-architecture
Hexagonal architecture patterns with pure core and side-effect shell for functional codebases
526 Updated 1 weeks ago
nWave-ai AI & Automation Solid
nw-fp-domain-modeling
Domain modeling with algebraic data types, smart constructors, and type-level error handling
526 Updated 1 weeks ago
nWave-ai AI & Automation Featured
fp-pragmatic
A practical, jargon-free guide to functional programming - the 80/20 approach that gets results without the academic overhead
39,350 Updated today
sickn33 AI & Automation Solid
nw-fp-fsharp
F# language-specific patterns, Railway-Oriented Programming, and Computation Expressions
526 Updated 1 weeks ago
nWave-ai