Comments (3)
Hi,
Thanks for the issue and taking the time to provide a quick reproducer.
The issue might be in the get
operation, I need to make further check as soon as I have some time.
To fix the issue gracefully, I would use diff
:
$result = $base_list->diff(...$excluded_list);
from collection.
In my case, i start with a list of integers that are mapped to value objects:
$excluded_list = Collection::fromIterable([2])
->distinct()
->map(fn ($v) => new ValueObject($v));
later comes the filtering logic.
Currently, I've managed to "bypass" the lazy mechanism by creating a new collection
Collection::fromIterable($excluded_list->all());
after using distinct, this helps in my case.
Thanks for the quick response!
EDIT: Sorry, I accidentally closed this issue
from collection.
Since this issue has not had any activity within the last 5 days, I have marked it as stale.
I will close it if no further activity occurs within the next 5 days.
from collection.
Related Issues (20)
- `Partition` Operation - Awkward to use? HOT 18
- Add find/search/where/single/firstWhere method HOT 23
- Modify `all` operation to prevent data loss HOT 6
- PHPStan 1.0 upgrade HOT 1
- Typed collection support HOT 17
- API oddities HOT 6
- Reduction operations should return a single value HOT 9
- Issue with cache and fromCallable HOT 13
- PHPStan reporting an error for missing optional parameters HOT 6
- [Question] Rename Collection interface to CollectionInterface HOT 1
- Dependency Dashboard HOT 51
- Collection interface doesn't extend Countable HOT 9
- Weird interplay between Collection and PDO result set HOT 13
- Plus operation RFC HOT 10
- Palm cannot infer types when using some operations HOT 4
- Unexpected behavior of pair operation over empty collection HOT 1
- [Feature request] Implement stable sorting HOT 12
- Memory size exhausted for large collections HOT 15
- Distinct is slow HOT 2
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 collection.