LabscoMCP early access ↗

Go makes you write the same little loops again and again — filter a list, group it, find one item, split it into chunks; samber/lo has all of them already written and type-safe.

WHEN TO USE

SCOPE

USE FOR

  • Transform a slice or map with a declarative Map, Filter, or Reduce call instead of a loop.
  • Choose between lo's immutable, parallel, mutable, or lazy-iterator variants for a workload.
  • Chain Filter, Map, and GroupBy calls into one readable transform pipeline.
  • Stop a batch transform on its first error using lo's Err-suffixed variants.

NOT FOR

  • Streaming pipelines over infinite or asynchronous event streams.