View Get-FilesRecursively.ps1
Get-ChildItem -Recurse | where { $_.Directory } | %{ [System.String]::Format("{0}`t{1}`t{2}", $_.FullName, $_.Length, $_.LastWriteTime) } | %{ Write-Output $_ }
View exceptionalParameterizedTest.fs
let catch (expr: Lazy<'T>) =
try
Choice2Of2(expr.Force())
with
| ex -> Choice1Of2(ex)
let parameterizedTest(input, expected) = test {
let actual = catch (Lazy.Create <| fun () -> fut input)
match (expected, actual) with
| (Choice1Of2 ex, Choice1Of2 ex') ->
View assertSeqEquals.fs
(*
* The MIT License (MIT)
*
* Copyright (c) 2016 Kazuhiro Matsushima
*
* 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 copies or substantial portions of the Software.
View factorialNumberSystem.fs
let rec factorial n =
match n with
| 0 | 1 -> 1
| _ -> n * (factorial (n - 1))
type FactorialNumber(num: int) =
let infactorials = Seq.initInfinite <| fun i -> factorial (i+1)
let range = Seq.takeWhile (fun fc -> fc <= num) infactorials |> Seq.toList
let rec factSystemize n fcs acc =
match fcs with
View ConsolePrinter.fs
module ConsolePrinter =
open System.Text
open System.ComponentModel
[<EditorBrowsable(EditorBrowsableState.Never)>]
let private bit mask b =
b &&& mask = mask
[<EditorBrowsable(EditorBrowsableState.Never)>]
let private bit0 = bit 0b00000001uy
View gifts.fs
type Family = Blair | Smith | Kelly | Tavares | Chen | Singh
type Person = { First: string; Last: Family }
let blair's first = { First = first; Last = Blair }
let smith's first = { First = first; Last = Smith }
let kelly's first = { First = first; Last = Kelly }
let tavares' first = { First = first; Last = Tavares }
let chen's first = { First = first; Last = Chen }
let singh's first = { First = first; Last = Singh }
View papylon_doc.ja.rst

ぱぴろん非公式ドキュメント

ぱぴろんとは?

ぱぴろん(Papylon)は、満たすべき性質(property)を記述することでテストケースを自動生成する Python 用テスティングツールです。いわゆる"QuickCheck"系の流れを汲み、 FsCheckScalaCheck の影響を強く受けています。テストしたい対象の振る舞うべき性質を記述して実行すると、テストケースをランダムに生成して実行し、性質が成り立つかどうかを確認します。

簡単な例

View hchobi_1.md

List

  /\
a1 /\
  a2  /\
    a3   nil

foldr

View robustness_head.rst
View TestBuilder.fs
// コンピュテーション式中で用いる型
type AssertionResult<'T> =
| NotAsserted of 'T
| Success
| Failure of string
// コンピュテーションビルダー
type TestBuilder() =
member self.Bind(x, f) =
match x with