I don't think I would call this functional. Python is decidedly not at all functional - there's no way to declare arbitrary functions inline, no chaining of map/filter etc.
But the static types are definitely welcome. I didn't know about the type
keyword. Apparently it makes it support forward references.