using System; using System.Collections.Generic; namespace Discord.Commands { public static class IEnumerableExtensions { public static IEnumerable Permutate( this IEnumerable set, IEnumerable others, Func func) { foreach (TFirst elem in set) { foreach (TSecond elem2 in others) { yield return func(elem, elem2); } } } } }