Пример #1
0
        private static IEnumerable <int> ParseInput()
        {
            var countParser = Int.AndL(Newline);
            var seqParser   = Many(Spaces.AndRTry(Int));
            var entryParser = Tuple(countParser, seqParser);
            var allEntries  = Many1(entryParser);
            var path        = Path.Combine(AppContext.BaseDirectory, "data.txt");
            var result      = allEntries.RunOnFile(path).GetResult();

            return(result[0].Item2);
        }