Quantcast
Channel: Active questions tagged ocaml - Stack Overflow
Viewing all articles
Browse latest Browse all 527

For loops in ocaml

$
0
0

I want to do something like the following.

let switchgraph cases =  let g = Graph.makeGraph() in  let g = (Graph.addNode g 1) in  for i = 2 to cases do     let g = (Graph.addNode g i) in  done  g

But apparently, this is not possible. How else can I achieve this?


Viewing all articles
Browse latest Browse all 527

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>