Skip to content

Instantly share code, notes, and snippets.

@giuliohome
giuliohome / io.fsx
Created June 6, 2017 15:15 — forked from battermann/io.fsx
IO Monad in F#
[<AutoOpen>]
module IO =
type IO<'a> =
private
| Return of (unit -> 'a)
| Suspend of (unit -> IO<'a>)
let rec run x =
match x with
| Return v -> v()
@giuliohome
giuliohome / simple_wcf.fs
Last active November 6, 2016 13:53 — forked from dgfitch/simple_wcf.fs
A sample WCF host and client in F#, extremely simple but a starting point
open System
open System.ServiceModel
open System.ServiceModel.Description
[<ServiceContract(ConfigurationName = "PublishService", Namespace = "http://xyz.gov/PublishService")>]
[<ServiceBehavior(InstanceContextMode=InstanceContextMode.PerSession)>]
type IPublishService =
[<OperationContract(Name="TestMethod")>]
abstract member TestMethod : name:string -> string