My wife is a commercial litigation lawyer and I've always wondered about the similarities between legislation, contracts and code.
Cool. Do you know about the paper on "composable contracts" that defines financial contracts (derivatives, etc) in terms of functional combinators? It's pretty cool. They're able to define automatic Black-Scholes valuations for complex derivatives, and stuff.