fp-pragmatic

Featured

A practical, jargon-free guide to functional programming - the 80/20 approach that gets results without the academic overhead

AI & Automation 39,350 stars 6386 forks Updated today MIT

Install

View on GitHub

Quality Score: 99/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Pragmatic Functional Programming **Read this first.** This guide cuts through the academic jargon and shows you what actually matters. No category theory. No abstract nonsense. Just patterns that make your code better. ## When to Use - You want a pragmatic starting point for fp-ts or functional programming in TypeScript. - The task is exploratory or educational and needs an 80/20 view of what is actually worth adopting. - You need guidance on when FP helps and when it is better to keep code simple. ## The Golden Rule > **If functional programming makes your code harder to read, don't use it.** FP is a tool, not a religion. Use it when it helps. Skip it when it doesn't. --- ## The 80/20 of FP These five patterns give you most of the benefits. Master these before exploring anything else. ### 1. Pipe: Chain Operations Clearly Instead of nesting function calls or creating intermediate variables, chain operations in reading order. ```typescript import { pipe } from 'fp-ts/function' // Before: Hard to read (inside-out) const result = format(validate(parse(input))) // Before: Too many variables const parsed = parse(input) const validated = validate(parsed) const result = format(validated) // After: Clear, linear flow const result = pipe( input, parse, validate, format ) ``` **When to use pipe:** - 3+ transformations on the same data - You find yourself naming throwaway variables - Logic reads better top-to-bottom **When to skip pipe:** - Just 1-2 operation...

Details

Author
sickn33
Repository
sickn33/antigravity-awesome-skills
Created
4 months ago
Last Updated
today
Language
Python
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category