Samber/lo is a Lodash-style Go library based on Go 1.18+ Generics. This project started as an experiment with the new generics implementation. It may look like Lodash in some aspects. I used to code with the fantastic "go-funk" package, but "go-funk" uses reflection and therefore is not typesafe. As expected, benchmarks demonstrate that generics are much faster than implementations based on the "reflect" package. Benchmarks also show similar performance gains compared to pure for loops. In the future, 5 to 10 helpers will overlap with those coming into the Go standard library (under package names slices and maps). I feel this library is legitimate and offers many more valuable abstractions.

Features

  • This library is v1 and follows SemVer strictly
  • No breaking changes will be made to exported APIs before v2.0.0
  • Various supported helpers for channels
  • Library based on Go 1.18+
  • Most of the time, the compiler will be able to infer the type
  • Many Function helpers

Project Samples

Project Activity

See All Activity >

Categories

Libraries

License

MIT License

Follow lo

lo Web Site

Other Useful Business Software
Go From AI Idea to AI App Fast Icon
Go From AI Idea to AI App Fast

One platform to build, fine-tune, and deploy ML models. No MLOps team required.

Access Gemini 3 and 200+ models. Build chatbots, agents, or custom models with built-in monitoring and scaling.
Try Free
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of lo!

Additional Project Details

Operating Systems

Linux, Mac, Windows

Programming Language

Go

Related Categories

Go Libraries

Registered

2023-01-05