Comments (2)
MoreLINQ has Index[1][2] already that solves this problem once and for all. You
can compose it before ForEach like this to get the index:
list.Index().ForEach(e => Console.WriteLine("list[{0}] = {1}", e.Key, e.Value));
[1]
https://code.google.com/p/morelinq/source/browse/MoreLinq/Index.cs?name=1.0&r=9e
a817b7a5aa0983230979259523e663d356e04f
[2] https://www.nuget.org/packages/MoreLinq.Source.MoreEnumerable.Index/
Original comment by azizatif
on 7 May 2015 at 11:54
- Changed state: WontFix
from morelinq.
Original comment by azizatif
on 7 May 2015 at 11:54
- Added labels: Type-Enhancement
- Removed labels: Type-Defect
from morelinq.
Related Issues (20)
- add Memoize support HOT 2
- ToDataTable throws on type with public static member HOT 6
- It would be nice to have a Top operator that would merge OrderBy and Take HOT 1
- F# countBy analogue HOT 2
- Usage example for SingleOrFallback HOT 7
- converting IEnumerable<TSource> into IEnumerable<IEnumerable<TSource>>? HOT 2
- Buffering HOT 2
- Please make .NET 4 compatible distribution (or allow silent modifications) HOT 1
- Interleave irregular enumerables with circular strategy HOT 5
- TakeLast example incorrect HOT 5
- Patch for /MoreLinq/DistinctBy.cs HOT 2
- Implement Full Outer Join HOT 1
- ExpandoObject inclusion HOT 4
- Patch for /MoreLinq/EquiZip.cs HOT 1
- Change ArgumentNullException to early return. HOT 1
- MaxByOrDefault HOT 3
- Scan should not throw on empty sequences HOT 1
- Batch should return an IEnumerable<IList<T>> HOT 2
- Migrate to GitHub/BitBucket HOT 15
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 morelinq.