Complete builders, start work on using them

This commit is contained in:
FiniteReality
2016-11-15 20:53:18 +00:00
parent f95154af23
commit af433c82cc
11 changed files with 416 additions and 408 deletions

View File

@@ -0,0 +1,22 @@
using System;
using System.Collections.Generic;
namespace Discord.Commands
{
public static class IEnumerableExtensions
{
public static IEnumerable<TResult> Permutate<TFirst, TSecond, TResult>(
this IEnumerable<TFirst> set,
IEnumerable<TSecond> others,
Func<TFirst, TSecond, TResult> func)
{
foreach (TFirst elem in set)
{
foreach (TSecond elem2 in others)
{
yield return func(elem, elem2);
}
}
}
}
}