What problem does it solve?
This Skill helps you eliminate repetitive for-loops in Go by providing Lodash-inspired, type-safe functional utilities that make collection transformations more readable and safer.
Core Features & Use Cases
- Declarative slice/map transforms: use immutable helpers like Map, Filter, Reduce, and GroupBy to express business logic without manual iteration.
- Error-aware and composable patterns: apply MapErr and FilterMap to handle failures predictably (stop-on-first error vs skip-and-continue).
- Performance-informed variants: switch to lop for CPU-bound parallelism, lom for in-place mutation on hot paths, and loi for lazy evaluation when chaining many transforms.
Quick Start
Use the golang-samber-lo skill to refactor your Go function that currently uses nested loops into a clear pipeline using lo.Map, lo.Filter, and lo.GroupBy, and ask it to choose the right variant (lo vs lop vs lom vs loi) based on dataset size and whether you want immutability or in-place mutation.