-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7510050
commit 525e5b9
Showing
3 changed files
with
34 additions
and
1 deletion.
There are no files selected for viewing
28 changes: 28 additions & 0 deletions
28
samples/Hussy.Net.Playground/Golfing/C272452/HussyDryRun.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
namespace Hussy.Net.Playground.Golfing; | ||
|
||
public sealed partial class C272452 | ||
{ | ||
/// <summary> | ||
/// The hussy run simply compresses the golfed dry run. | ||
/// </summary> | ||
/// <param name="t">The stopping value for the test.</param> | ||
/// <returns> | ||
/// A collection of strings representing the output for the specified <paramref name="target"/>. | ||
/// </returns> | ||
/// <remarks> | ||
/// Fully condensed, this method body becomes <c>156</c> bytes. | ||
/// </remarks> | ||
private static IEnumerable<string> HussyDryRun(int t) | ||
{ | ||
var results = new List<string>(capacity: t); | ||
Gr(t).E(i => | ||
{ | ||
string e = null; | ||
F(i, Md3, Dv3, _ => e += "Fizz"); | ||
F(i, Md5, Dv5, _ => e += "Buzz"); | ||
results.Add(e ?? i.Ts()); | ||
}); | ||
|
||
return results; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters