Appending Two Lists Based on A Discriminated Union Type Using Continuation

Lists are pointers to the head of list. It can be defined by a discriminated union type. Using continuation can do a tail-recursion version of appending two lists.