public static IEnumerable<IEnumerable<Point>> GetAttackablePoints(Point queenPosition) { return new Func<Point, Point>[] { GoNorth, GoNorthEast, GoEast, GoSouthEast, GoSouth, GoSouthWest, GoWest, GoNorthWest } .Select(direction => queenPosition .GenerateFrom(direction) .Skip(1) .TakeWhile(IsOnTheBoard)); }