refactor:functional
Installation
SKILL.md
Refactor this Swift codebase to follow functional programming principles:
Replace Mutability with Immutability
Convert var to let wherever possible Replace mutable collections with immutable transformations Use value types (structs/enums) instead of reference types (classes) where appropriate Eliminate property mutations in favor of creating new instances
Extract Pure Functions
Identify functions with side effects and refactor them to be pure Move I/O operations (network calls, file access, database queries) to the edges of the system Replace stateful methods with functions that take input and return output Ensure functions don't modify external state or rely on mutable global variables
Use Higher-Order Functions