It's actually extremely easy, particularly if you're familiar with Prolog (the core algorithm is a couple lines in Prolog, so knowing how that works is useful for implementing it in other languages).
I suspect the lack of statically typed scripting languages is more of a historical accident than anything.
I suspect the lack of statically typed scripting languages is more of a historical accident than anything.