I don't think I want to use match. The licence header should be the first thing in the file (there are no existing examples where it is not).

> g is a little cryptic as a variable name

Agreed. Will do.