Comments (2)
Maybe you could check about the topic "Functional programming", it should answer your question about why people need this.
from lo.
@lamhieo02 it's more convenient to do complex processing in a declarative way using map/filter/reduce/flatmap
chains.
Usually, this functionality uses the power of iterators to avoid unnecessary memory allocations, but this library (and JS as well) consumes and returns plain slices which leads to increased memory allocation.
It's possible to implement the same functionality with iterators (example), but as Go (yet) isn't designed with iterators in mind - you'll still need to transform a final result into a slice to use it in code which isn't familiar with iterators.
from lo.
Related Issues (20)
- Fix `PartitionBy` to initialize as many slices in the outer slice as partitions mentioned in the iteratee func HOT 1
- Request: How to use lo.Map HOT 1
- TryOr0 not implemented HOT 1
- Is there any function like ObjectUtils#defaultIfNull ? HOT 2
- Proposal: lo.ClonePtr HOT 1
- Add Same function
- proposal: get child array instead of source array in UniqBy
- ContainsBy for map HOT 2
- feat: add chain like js lodash flow HOT 1
- Proposal: Add throttle HOT 1
- Proposal: Parallel Uniq and Find
- Porposal: provide functions without index such as Map HOT 2
- The `lo.If'result` executed when `lo.If'condition` is false. HOT 4
- Does this repo still maintained? HOT 2
- lo.Associate()with nil slice returns non-nil map
- New func to add error to response
- IntersectBy,DifferenceBy,UnionBy for slice HOT 2
- Why is there no fuction for calculating the mean, such as mean or meanby?
- Add counterpart to ToSlicePtr: FromSlicePtr
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lo.