I'm new to ocaml. I get the following error when I am trying to execute this code.
let rec parser (edge_lst : edge list) (miniNode_lst: miniNode List) (previousNode : miniNode) (s_lst: stmt list) =
match s_lst with
| [] -> (*no more statements => Add stop node and save the graph*) (edge_lst,miniNode_lst)
| hd :: tl ->
let currentNode = createNode(hd)
in let miniNode_lst_new = miniNode_lst@[currentNode] and
edge_lst_new = edge_lst@[createEdge(previousNode,currentNode) in
parser edgePlst_new miniNode_lst_new currentNode tl;
Error: Syntax error: type expected.
Please let me know where exactly I am going wrong here.