As it turned out, JavaScript is a simple, flexible language that we’d like to use elsewhere, so this deceptively easy problem needs a lot of work to solve it satisfactorily.