What problem does it solve?
Writing functional Go code with the fp-go v2 library is error-prone because its data-last API, leading type parameters, and monad selection rules are easy to misremember, and the library is underrepresented in training data. This Skill encodes the correct patterns so generated code compiles and follows fp-go idioms.
Core Features & Use Cases
- Correct code generation rules: Enforces the v2 import path, data-last composition, non-inferrable leading type parameters, and point-free style with Flow and Pipe.
- Monad selection guidance: Maps use cases to Option, Result, IOResult, ReaderIOResult, and Effect, including typed dependency injection for production services.
- Do-notation patterns: Covers Bind, ApS, Let, LetTo, and BindTo with lens-based setters for accumulating multiple intermediate results.
- Use Case: Convert idiomatic Go error handling with if-err boilerplate into a functional pipeline using result.Eitherize1, Chain, and GetOrElse, then verify it with go build and go vet.
Quick Start
Use the fp-go skill to refactor this Go function's error handling into a Result-based pipeline with Flow composition.