Skip to content

Instantly share code, notes, and snippets.

@JohnMGant
Created August 7, 2020 17:56
Show Gist options
  • Select an option

  • Save JohnMGant/160684a9d35f68f565941fc4dfc8a6ff to your computer and use it in GitHub Desktop.

Select an option

Save JohnMGant/160684a9d35f68f565941fc4dfc8a6ff to your computer and use it in GitHub Desktop.
internal class LinqAggregateAdder : IIntegerAdder
{
public int Add(int[] values) => values.Aggregate((sum, val) => sum += val);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment