Skip to content

Instantly share code, notes, and snippets.

@qerub
qerub / cons.cs
Created May 8, 2013 19:06
Cons (i.e. prepend) for IEnumerable in C#
public static IEnumerable<T> Cons<T>(T head, IEnumerable<T> tail)
{
yield return head;
foreach (var t in tail) yield return t;
}
@panesofglass
panesofglass / FSharpHub.fs
Last active December 15, 2015 08:49
Use SignalR from F# via OWIN
namespace tryfs
open System
open Owin
open Microsoft.AspNet.SignalR
open Microsoft.Owin.Hosting
// Use ImpromptuInterface for dynamic support in the TryFS.Send method.
// Could also use http://fssnip.net/2U or http://fssnip.net/2V
open ImpromptuInterface.FSharp