public override bool Key(KeyCode first, params KeyCode[] other) { if (!other.Any()) { return(Functor.func(first)); } var aggregate = Modifier.Key(first); for (var i = 0; i < other.Length - 1; i++) { aggregate &= Modifier.Key(other[i]); } aggregate &= Functor.func(other[other.Length - 1]); return(aggregate); }
public override bool Key(KeyCode first, params KeyCode[] other) => other.Aggregate(Functor.func(first), (working, next) => working || Functor.func(next));