Skip to content

Instantly share code, notes, and snippets.

View chnlkw's full-sized avatar

Kaiwei Li chnlkw

  • Tsinghua University
  • Beijing
View GitHub Profile
@battermann
battermann / free.fsx
Last active February 17, 2022 23:26
Free Monad like pattern in F#
#load @"paket-files/fsprojects/Chessie/src/Chessie/ErrorHandling.fs"
type Continuation<'output, 'next> = 'output -> 'next
module TerminalDsl =
open Chessie.ErrorHandling
type Terminal<'next> =
| WriteLine of string * Continuation<unit, 'next>
| ReadLine of unit * Continuation<string, 'next>
@latkin
latkin / code.fsx
Last active November 13, 2019 09:06
Seq perf
open System
open System.Collections
open System.Collections.Generic
open System.Diagnostics
open System.Linq
module Algos =
//
// non-lazy solutions
//