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 single shortcut for reducing single element enumerables #39549

Closed
wants to merge 1 commit into from

Commits on Jun 5, 2020

  1. Add single shortcut for reducing single element enumerables to that e…

    …lement
    
    I frequently find myself and my team working with enumerables that we know should only contain a single element. Using #first or #last does not adequately protect against those times when the enum has length 0 or > 1, and does nothing to indicate that the enumerable is expected to have exactly 1 element.
    rynonl committed Jun 5, 2020
    Configuration menu
    Copy the full SHA
    1bc376c View commit details
    Browse the repository at this point in the history