Command Palette

Search for a command to run...

Назад к скиллам
скилл № 06824

functional-patterns

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

БесплатноБез исполняемых скриптов
sethdfordот sethdford★ 51 звезда на GitHub

Установить functional-patterns в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Об этом скилле

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

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл functional-patterns?

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

Как установить скилл functional-patterns?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл functional-patterns запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить functional-patterns с