Skip to content

Instantly share code, notes, and snippets.

View simon-reynolds's full-sized avatar

Simon Reynolds simon-reynolds

View GitHub Profile
@dmitry-pavlov
dmitry-pavlov / ListToTree.cs
Created March 8, 2019 15:18
Nice & universal way to convert List of items to Tree
using System;
using System.Collections.Generic;
using System.Linq;
using Xunit;
using Xunit.Abstractions;
namespace ListToTree
{
public class Category
{
@robertpi
robertpi / gist:2964793
Created June 21, 2012 09:18
F# record implementing an interface
namespace MyNamespace
type IMyInterface =
abstract GetValue: unit -> string
type MyRecord =
{ MyField1: int
MyField2: string }
interface IMyInterface with
member x.GetValue() = x.MyField2