fp-patterns

Guide Scala 3 developers on functional programming patterns and anti-patterns.

Updated Mar 3, 2026
One-click install
npx skills add https://github.com/EtaCassiopeia/claude-skills --skill fp-patterns
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: fp-patterns
Source: https://github.com/EtaCassiopeia/claude-skills/tree/main/config/skills/fp-patterns
Command: npx skills add https://github.com/EtaCassiopeia/claude-skills --skill fp-patterns

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill helps developers design robust, maintainable Scala 3 applications by understanding and applying functional programming patterns and avoiding common anti-patterns.

Core Features & Use Cases

  • Pattern Recognition: Identify and apply functional programming patterns like algebraic design, typeclass derivation, and effect composition.
  • Anti-Pattern Avoidance: Learn to recognize and avoid anti-patterns such as monad transformers and mutable state.
  • Use Case: When you're working on a Scala 3 project and need to decide between using monads, applicatives, or functors, or when you're implementing typeclasses and need to ensure they are correctly derived.

Quick Start

Use the fp-patterns skill to understand the difference between monads and applicatives in Scala 3.

Frequently Asked Questions about fp-patterns

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
What is the difference between monads and applicatives in Scala 3?

Monads and applicatives in Scala 3 differ primarily in effect composition, where monads sequence dependent computations and applicatives compose independent effects. Understanding this distinction helps developers apply correct functional programming patterns for maintainable code.

How do I avoid common functional programming anti-patterns in Scala 3?

To avoid common functional programming anti-patterns in Scala 3, recognize and steer clear of monad transformers and mutable state. Applying algebraic design and correct typeclass derivation ensures robust and maintainable application architecture.

When should I use typeclass derivation in Scala 3?

Typeclass derivation in Scala 3 should be used when implementing typeclasses to ensure they are correctly derived. This functional programming pattern improves code quality and maintainability by enabling ad-hoc polymorphism without altering existing class hierarchies.

What is the best way to compose effects in Scala 3 functional programming?

The best way to compose effects in Scala 3 functional programming is by applying correct functor, applicative, and monad usage patterns. Proper effect composition prevents common pitfalls and builds robust, maintainable applications.

Why should I avoid monad transformers in Scala 3?

You should avoid monad transformers in Scala 3 because they are identified as a functional programming anti-pattern. Avoiding them in favor of algebraic design and proper effect composition prevents complex code structures and improves maintainability.