Sha256: 7b864e74d0d79271ff9e3cdb4074c48b4141e0dc6ee391ae0c292df6a80312e7
Contents?: true
Size: 481 Bytes
Versions: 43
Compression:
Stored size: 481 Bytes
Contents
using System; using System.Linq; public static class Proverb { public static string[] Recite(string[] subjects) { Func<int, string> line = (lineIndex) => { if (lineIndex == subjects.Length) return $"And all for the want of a {subjects[0]}."; else return $"For want of a {subjects[lineIndex - 1]} the {subjects[lineIndex]} was lost."; }; return Enumerable.Range(1, subjects.Length).Select(line).ToArray(); } }
Version data entries
43 entries across 43 versions & 1 rubygems