Skip to content

Instantly share code, notes, and snippets.

@tonytaylor
tonytaylor / provision.sh
Created April 28, 2023 13:49 — forked from svpernova09/provision.sh
WSL PHP Development
#!/usr/bin/env bash
export DEBIAN_FRONTEND=noninteractive
# Update Package List
apt-get update
# Update System Packages
apt-get upgrade -y
@tonytaylor
tonytaylor / ConstrainedTypesExamples.fsx
Created May 26, 2024 20:19 — forked from swlaschin/ConstrainedTypesExamples.fsx
Examples of creating constrained types in F#
// General hints on defining types with constraints or invariants
//
// Just as in C#, use a private constructor
// and expose "factory" methods that enforce the constraints
//
// In F#, only classes can have private constructors with public members.
//
// If you want to use the record and DU types, the whole type becomes
// private, which means that you also need to provide:
// * a constructor function ("create").