Skip to content

Instantly share code, notes, and snippets.

View gregory-nisbet's full-sized avatar

Gregory Nisbet gregory-nisbet

  • California, United States
View GitHub Profile
#!/bin/bash
usage() {
printf '%s\n' "Usage: gitsplit [-m message] paths..."
}
while getopts "hm:" opt; do
case "$opt" in
m)
message="$OPTARG" ;;
@gregory-nisbet
gregory-nisbet / typecheck.pl
Last active July 7, 2019 20:09
"type checking" a lambda calculus expression by counting variable occurrences. Not efficient.
#! /usr/bin/env perl
# (c) Gregory Nisbet 2019 ISC license.
use strict;
use warnings;
use Test::More tests => 3;
# representation of a lambda calculus term
# \ is a visual pun on the lambda syntax in Haskell
# three-valued logic without disjunction introduction
import itertools as it
F = "F"
T = "T"
U = "U"
domain = (F, U, T)