First (not quite working) attempt in Julia.