Skip to content

Instantly share code, notes, and snippets.

View petrsvihlik's full-sized avatar
😋
Strategizing...

Petr Švihlík petrsvihlik

😋
Strategizing...
View GitHub Profile
@petrsvihlik
petrsvihlik / gist:9076c8eb333c0b4617377be50f4fae81
Created August 17, 2022 12:45
Some swift enum hocus pocus
import Foundation
public enum ShapeRawEnum: String, RawRepresentable {
case square
case circle
public var requestString: String {
return self.rawValue
}
@petrsvihlik
petrsvihlik / nested_discard.cs
Created September 30, 2022 08:43
Nested discard parameters
Func<string, string, string> action = new Func<string, string, string>((_, parameter) =>
{
string function(string x)
{
Console.WriteLine(x);
return x;
}
_ = function(parameter);
return "whatever";
});