Skip to content

Instantly share code, notes, and snippets.

@Jmaharman
Jmaharman / trial.fsx
Created June 19, 2020 06:51
Doing applicative validation in a CE before F# 5
open System
type Trial<'Value, 'Error> =
| Pass of 'Value
| Fail of 'Error list
[<RequireQualifiedAccess>]
module Trial =
let map2 merge trial1 trial2 =
match (trial1, trial2) with
@Jmaharman
Jmaharman / zip-modified-files
Created June 27, 2014 11:35
Create zip of file changes between head and previous commit
git archive --format=zip HEAD `git diff HEAD^ HEAD --name-only` > modified-files.zip