let rec string_of_value = function
        | RStringValue(s) -> s
        | RIntegerValue(i) -> string_of_int i
        | RFloatValue(f) -> string_of_float f
        | RBooleanValue(b) -> string_of_bool b
        | RMapValue(t, ArraySubtypeas v ->
                        let lst = list_of_array v
                        in let rec loop s = function
                                | [] -> s^"]"
                                | v::[] -> loop (s^(string_of_value v)) []
                                | v:: tl -> loop (s^(string_of_value v)^", ") tl
                        in loop "[" lst
        | RMapValue(t, MapSubtype->
                        (Hashtbl.fold (fun prop v s ->
                                                                s^prop^": "^(string_of_value v)^";") t "{")^"}"
        | RFunctionValue(_, _, _, _, _, _, _)        | RLibraryFunction(_) -> "function"
        | RVoid -> "void"
        | RUndefined -> "undefined"