Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add SpillHead #753

Open
wants to merge 35 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
7839032
Initial version SpillSpan (WIP)
atifaziz Aug 5, 2020
359bc56
Fix copyright year
atifaziz Aug 6, 2020
1c02293
Remove Kons dependency
atifaziz Aug 6, 2020
d9fee41
Merge branch 'master' into spill-span
atifaziz Aug 6, 2020
3706b77
Use terser Func expression
atifaziz Aug 6, 2020
c639553
Move out of experimental namespace
atifaziz Aug 7, 2020
c1fe89d
Implement all overloads in terms of the core
atifaziz Aug 7, 2020
a3b2a29
Have core overload provide index
atifaziz Aug 7, 2020
14deb60
Fix test name
atifaziz Aug 7, 2020
1fdbf8e
Use the simpler overload in the basic test
atifaziz Aug 7, 2020
0d674dd
Throw "InvalidOperationException" if there's no header
atifaziz Aug 7, 2020
26f1d96
Avoid list allocation for head count == 1
atifaziz Aug 7, 2020
662b3fa
Remove the throw case that is impossible
atifaziz Aug 7, 2020
57d4c71
Complete previous commit
atifaziz Aug 7, 2020
bb32281
Rename to SpillHead
atifaziz Aug 7, 2020
4c38d38
Save final list copy
atifaziz Aug 10, 2020
2582f4a
Add complementary overloads
atifaziz Aug 10, 2020
3b7397f
Expand generic type parameter names
atifaziz Aug 10, 2020
9820013
Review code layout
atifaziz Aug 10, 2020
f56c76f
Discard unused args
atifaziz Aug 10, 2020
368e5cc
Add test for simplest case
atifaziz Aug 10, 2020
fbfe12a
Fix initial head element missing in list
atifaziz Aug 10, 2020
1ec6e44
List in package description
atifaziz Aug 10, 2020
c61f8e0
Add to-do in README doc
atifaziz Aug 10, 2020
9906ca1
Add test case for when there is just head
atifaziz Aug 11, 2020
ebc6b1f
Fix head loop bug
atifaziz Aug 11, 2020
af3ad95
Test for when none satisfy head predicate
atifaziz Aug 11, 2020
6c80586
Complete documentation
atifaziz Aug 11, 2020
bd3d53f
Refresh doc comments for generated counterpart
atifaziz Aug 11, 2020
aa56aa2
Remove args redundant with overload
atifaziz Aug 11, 2020
e000c63
Add more tests
atifaziz Aug 11, 2020
71f9120
Test single-pass iteration & enumerator disposal
atifaziz Aug 11, 2020
4219e17
Make testing sequence setup more readable
atifaziz Aug 11, 2020
aac8fea
Merge branch 'master' into spill-span
atifaziz Aug 11, 2020
25c256a
Merge remote-tracking branch 'upstream/master' into spill-span
atifaziz Sep 22, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove args redundant with overload
atifaziz committed Aug 11, 2020
commit aa56aa28018360a2467476f1037b14ce544292ad
3 changes: 0 additions & 3 deletions MoreLinq.Test/SpillHeadTest.cs
Original file line number Diff line number Diff line change
@@ -138,9 +138,6 @@ from e in
Regex.Split(csv.Trim(), @"\r?\n")
.Select(line => line.Trim())
.SpillHead(h => Regex.Match(h, @"^;\s*(\w+)") is var m & m.Success ? (true, m.Groups[1].Value) : default,
Enumerable.Empty<string>(),
MoreEnumerable.Return,
(a, h) => a.Append(h),
h => MoreEnumerable.Return(h.Index()
.ToDictionary(e => e.Value, e => e.Key))
.SelectMany(d => new[] { "a", "b", "c" },