Skip to content

Instantly share code, notes, and snippets.

View Thorium's full-sized avatar

Tuomas Hietanen Thorium

View GitHub Profile
@Thorium
Thorium / gist:2416591
Created April 18, 2012 21:11 — forked from mattpodwysocki/gist:165605
IObservable<T> is close to Async<T>, so why not: F# obs { ... } as async { ... }
#I @"C:\Tools\System.Reactive"
#r "System.Core.dll"
#r "System.Reactive.dll"
type observable<'a> = System.Collections.Generic.IObservable<'a>
type observer<'a> = System.Collections.Generic.IObserver<'a>
module Observable =
open System
open System.Linq
@Thorium
Thorium / gist:2473882
Created April 23, 2012 21:07 — forked from forki/gist:1400378
Poor mans type classes
// Mimic type classes with additional param
type 'a Num = {
zero: 'a
add: 'a -> 'a -> 'a
mult: 'a -> 'a -> 'a
fromInteger: int -> 'a }
let intNum = {
zero = 0
@Thorium
Thorium / Dockerfile
Last active August 29, 2015 14:24 — forked from junosuarez/Dockerfile
Dockerfile to start F# Owin project
FROM ubuntu:14.04
RUN apt-get -y update
# Install Mono (and fsharp)
RUN apt-get -y install mono-devel autoconf pkg-config make git libtool
RUN git clone https://github.com/fsharp/fsharp
RUN cd fsharp && ./autogen.sh --prefix /usr && make && make install
# Add some files