Skip to content

Instantly share code, notes, and snippets.

@boca
boca / monad01 - unit.cs
Created September 29, 2016 20:39
Monads!
void Main()
{
"Hello".Unit().Dump();
5.Unit().Dump();
DateTime.Today.Unit().Dump();
new List<char> { 'a', 'b' }.Unit().Dump();
(3 * 1.5).Unit().Dump();
}
public class Identity<T>
@boca
boca / crgp01 - product.cs
Created September 29, 2016 19:48
The Curiosly Recursive Generic Pattern
void Main()
{}
public class Manufacturer
{
public Manufacturer(string id, string name) {Id = id;Name = name;}
public string Id { get; set; }
public string Name { get; set; }
}