fun {ToVS V} case V of unit then u [] true then t [] false then f [] nil then n [] H|T then if {IsString V} then '"'#{Escape V}#'"' else {ToVS T}#{ToVS H}#'|' end elsecase {Value.type V} of atom then {ToVS {Atom .toString V}}#'A' [] int then {ToVS {Int .toString V}}#'I' [] float then {ToVS {Float.toString V}}#'F' [] tuple then {ToVS {Label V}|{Record.toList V}}#'T' [] record then {ToVS {Label V}|{Record.toListInd V}}#'R' end end