Skip to content

Instantly share code, notes, and snippets.

open System
type Example =
{
Name: string
EventReceiver: IEvent<string> option
}
let rec loop examples =
examples
@FoleyAxel
FoleyAxel / mailboxClear.fs
Last active December 26, 2015 00:19
mailbox clear
open System
type resultMsg =
| Add of string
| Fetch of AsyncReplyChannel<Set<string>>
| Clear
type Cache =
{
Add: string -> unit
@FoleyAxel
FoleyAxel / type mailbox
Created October 18, 2013 14:38
type mailbox
type resultMsg =
| Add of string
| Fetch of AsyncReplyChannel<Set<string>>
type resultContainer() =
let innerContainer =
MailboxProcessor.Start(fun inbox ->
let rec loop (n:Set<string>) =
async { let! msg = inbox.Receive()
match msg with
@FoleyAxel
FoleyAxel / gist:3418145
Created August 21, 2012 18:24
Folder Sync
open System
open System.Diagnostics
open System.IO
open System.Diagnostics
open System.Security.Cryptography
open System.Text.RegularExpressions
open System.Windows.Forms
let args = Environment.GetCommandLineArgs()
let filelist = pasvRead src_site resp
let sitelist = deserialize "sites"
sitelist |> Seq.filter (fun x -> x <> src_site) |> Seq.iter (fun x -> distribute src_site rls filelist x)