GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - tinyield/tinyield4net: A Minimalistic, extensible and lazy sequence implementation for dotnet

BranchesTags
Open more actions menu

Latest commit

 

History

15 Commits
15 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
tinyield4net
tinyield4net
 
 
tinyield4netTest
tinyield4netTest
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
tinyield4net.sln
tinyield4net.sln
 
 

Repository files navigation

tinyield4net

Nuget

A Minimalistic, extensible and lazy sequence implementation for .Net .

Usage

An auxiliary Collapse() method, which merges series of adjacent elements is written with Tinyield in the following way:

Traverser<T> Collapse<T>(Query<T> src)  {
    return yld => {
        T prev = default(T);
        src.ForEach(item => {
            if (prev.Equals(default(T)) || !prev.Equals(item))
            {
                prev = item;
                yld(item);
            }
        });
    };
}

This method can be chained in a sequence like this:

int[] arrange = new int[] { 7, 7, 8, 9, 9, 11, 11, 7 };
List<int> actual = Query.Of(arrange)
    .Then(n => Collapse(n))
    .Where(n => n % 2 != 0)
    .ToList();

Installation

$ dotnet add package com.tinyield.tinyield4net --version 1.0.0

Or check the nuget package for more info.

License

This project is licensed under Apache License, version 2.0

About

A Minimalistic, extensible and lazy sequence implementation for dotnet

Resources

Readme
Apache-2.0 license
Activity
Custom properties

Stars

0 stars

Watchers

2 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.