c# - Extension methods equivalents for CAR and CDR in .Net's Linq/IEnumerable -



c# - Extension methods equivalents for CAR and CDR in .Net's Linq/IEnumerable -

i know can someenumerable.first(). there's no .rest.

i know write one, wondering if missing something.

related question: are there ruby equivalents car, cdr, , cons?

for cdr can utilize enumerable.skip(1) like:

var cdrresultquery = someienumerable.skip(1);

consider next example:

ienumerable<int> someienumerable = new list<int> {1, 2, 3, 4, 5}; var cdrresultquery = someienumerable.skip(1); foreach (var in cdrresultquery) { console.writeline(i); }

and get:

2 3 4 5

c# linq ienumerable

Comments

Popular posts from this blog

formatting - SAS SQL Datepart function returning odd values -

c++ - Apple Mach-O Linker Error(Duplicate Symbols For Architecture armv7) -

php - Yii 2: Unable to find a class into the extension 'yii2-admin' -