Skip to content

Instantly share code, notes, and snippets.

Avatar

Steffen Forkmann forki

View GitHub Profile
View currying.fs
let withdrawWithAudit = withdraw |> auditAs "withdraw" Auditing.fileSystem
let depositWithAudit = deposit |> auditAs "deposit" Auditing.fileSystem
while true do
let action =
Console.WriteLine()
printfn "Current balance is £%M" account.Balance
Console.Write "(d)eposit, (w)ithdraw or e(x)it: "
Console.ReadLine()
@forki
forki / LICENSE
Created Apr 18, 2017 — forked from Pauan/LICENSE
Fable Elmish Counter Sample (in vanilla JavaScript)
View LICENSE
Copyright (c) 2017 Paul Chapman
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
View fake.cmd
@echo off
"FAKE\tools\Fake.exe" "%1"
exit /b %errorlevel%
@forki
forki / UndoMonadCalc.fs
Created Dec 9, 2011 — forked from dmohl/UndoMonadCalc.fs
UndoMonad Calculator Example
View UndoMonadCalc.fs
open System
open FSharpx.Undo
module Sample =
let rec handleInput<'a> = undoable {
match Console.ReadLine() with
| "undo" ->
let! _ = undo
()
| input ->
View Calendar.cs
using System;
namespace Aperea.iCalendar
{
public class Calendar
{
public void SetTime(DateTime dateTime)
{
}
View Calendar.cs
using System;
namespace Aperea.iCalendar
{
public class Calendar
{
public void SetTime(DateTime dateTime)
{
}
View gist:664317
module Server
type StartParams =
{ TimeOut: int;
Url: string; }
let startServer serverName startParams =
printfn "%s %d" serverName startParams.TimeOut
View Forkis-monadic-challenge
type OptionBuilder() =
member b.Delay(f) = f()
member b.Return(x) =
match x with
| None -> None
| Some r -> Some(r)
member b.Bind(p,rest) =