This file contains hidden or 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
| using System.Runtime.CompilerServices; | |
| var user1 = await GetUserById(id: 12); | |
| var address1 = await GetUserAddress(user1); | |
| Console.Out.WriteLine(address1.ToUpper()); | |
| var user2 = await GetUserById(id: 13); |
This file contains hidden or 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
| // a - element | |
| // c - amount | |
| // answer is - p1.a * p1.c + p2.a * p2.c | |
| // Invariant: p2.a == p3.a | |
| using Triple = ((int a, int c) p1, (int a, int c) p2, (int a, int c) p3); | |
| internal static class SubArray | |
| { | |
| internal static int Solve(int[] xs) |
This file contains hidden or 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
| static class KeyBoard | |
| { | |
| internal static IEnumerable<char> UnEscape(string a) | |
| { | |
| // Stacks keep good indexes | |
| var lowers = new Stack<(int, char chr)>(a.Count()); | |
| var uppers = new Stack<(int, char chr)>(a.Count()); | |
| for (int i = 0; i < a.Count(); i++) |
This file contains hidden or 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
| using System; | |
| using System.Linq; | |
| using FsCheck; | |
| using FsCheck.NUnit; | |
| namespace DiamondGenerator.Tests | |
| { | |
| [NUnit.Framework.TestFixture] | |
| public class DiamondTests | |
| { |