Skip to content

Instantly share code, notes, and snippets.

Terada Yuichiro u1roh

View GitHub Profile
View gist:5e12b8819a5aa0e5eca5
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 Aug 29, 2015
【添削希望】処理の進捗を通知するコンピュテーション式
View Program.fs
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
// コンピュテーション式
You can’t perform that action at this time.