Skip to content

Instantly share code, notes, and snippets.

View u1roh's full-sized avatar

Terada Yuichiro u1roh

  • CADDi
  • Tokyo, Japan
View GitHub Profile
open System
open System.Collections.Generic
open System.Threading
open System.Windows.Forms
open System.Drawing
module CpsSample1 =
let f1 a0 (continuation : _ -> unit) = continuation (2 * a0)
let f2 a1 (continuation : _ -> unit) = continuation (a1 + 1)
@u1roh
u1roh / Program.fs
Last active August 29, 2015 14:01
【添削希望】処理の進捗を通知するコンピュテーション式
open ProgressiveSandbox
open System.Threading
// テスト用のコンソールに進捗を書き出すリスナークラス
type TestProgressListener () =
let mutable value = 0.0
interface IProgressListener with
member this.Report step = value <- value + step; printfn "progress = %f" value
// コンピュテーション式