trying out semantics of the pattern matching proposal
import match, { string, number } from "@jamesernator/match"
match([string, string, number], ['cats', 'hats', 2]) // true
match.on('fizz')
.if(string, val => console.log("Got a string!")
.else(_ => { throw new Error("Not a string") })