New Julia solution, uses inner constructor.

@WestleyArgentum beat me to the first one, but here's a second. Similar, but uses a type and an inner constructor.