Super new to Ocaml. How do I access the "nth" value of a list without using the List module?

One downside to this, for longer lists, is that List.length traverses the entire list to find its length. If this is done frequently for longer lists it can be very expensive.

1 Like