A demo of Union/Find algorithm in ATS

Hi,

I was reading a chapter about type inference and constraint solving in ML.
It mentioned a quick Union/Find algorithm for testing equivalent classes. I
translate the code into ATS, and pasted here at glot.io: Union/Find
https://glot.io/snippets/eiaoq3icf1

Just for fun.

I suggest:

fun{} addr_of{a:t@ype} (pt a): ptr

Casting a pointer(64bit) to an integer(32bit) is a bit dangerous.