Command Palette

Search for a command to run...

Back to skills
skill № 06824

functional-patterns

Higher-order functions, composition, monads, immutability, and functional programming idioms.

FreeNo executable scripts
sethdfordby sethdford★ 51 GitHub stars

Install functional-patterns in Claude Code & Claude Desktop

Sign up to install this skill

Create a free account to reveal the install command and save the skill to your library.

  • Reveal the one-line install command
  • Save skills to your synced library
  • Get notified when skills update
Sign up freeI already have an account

About this skill

Functional Patterns

Using functional programming principles for clearer, more maintainable code.

Context

You are using functional patterns. Understand functional principles and idioms.

Domain Context

  • Pure Functions: No side effects; same input → same output
  • Composition: Build complex functions from simple ones
  • Higher-Order: Functions taking/returning functions
  • Immutability: Data doesn't change; create new versions instead
  • Monads: Pattern for handling effects (Maybe, Either, IO)

Instructions

  1. Prefer Pure Functions: Write functions without side effects
  2. Compose Functions: Chain simple functions together
  3. Use Higher-Order: Map, filter, fold; powerful abstractions
  4. Embrace Immutability: Don't mutate; create new values
  5. Handle Effects: Use monads or similar for side effects
  6. Test Easily: Pure functions are trivial to test

Anti-Patterns

  • Treating FP as dogma; some problems need mutation
  • Immutability everywhere killing performance; profile before pessimizing
  • Monads without understanding; they're useful but not required
  • Chaining operations so deeply it's unreadable; readability matters
  • Avoiding mutation for simple local data; FP isn't a religion

Further Reading

  • Richard Bird & Philip Wadler, Introduction to Functional Programming
  • Evan Czaplicki, Elm guide (great FP introduction)
  • Brian Lonsdorf, Mostly Adequate Guide to FP

Allowed tools

Tools this skill is permitted to call.

No restriction — this skill can use any tool.

FAQ

What does the functional-patterns skill do?

Higher-order functions, composition, monads, immutability, and functional programming idioms.

How do I install the functional-patterns skill?

Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.

Does the functional-patterns skill run scripts?

No, this skill is instructions only (SKILL.md) with no executable scripts.

Related skills

Compare functional-patterns with