open Ast

exception Error of string

let rec func_args_to_string typs =
    List.fold_left (fun str typ -> str ^ (type_to_string typ) ^ ",") "" typs

and type_to_string = function
      Int -> "int"
    | Double -> "double"
    | List(typ) -> "list<" ^ (type_to_string typ) ^ "> "
    | String -> "string"
    | Struct(str) -> "struct " ^ str
