Home
Insert
Update snippet 'Minimal coding kata setup'
Title
Description
Minimal coding kata setup that I use in my trainings - the aim is to use as simple F# syntax as possible and to have a nice way for specifying placeholders that attendees are required to fill.
Source code
// Minimal setup for coding katas (I usually put this in "setup.fsx") let __<'T> : 'T = failwith "Placeholder '__' was not filled!" let shouldEqual a b = if not (a = b) then failwithf "Values are not equal!\n Expected: %A\n Received: %A" a b // Sample tasks with placeholders and equality tests (#loads "setup.fsx") let nums = 40 + __ shouldEqual nums 42
Tags
kata
teaching
kata
teaching
Author
Link
Reference NuGet packages
If your snippet has external dependencies, enter the names of NuGet packages to reference, separated by a comma (
#r
directives are not required).
Update