Often times I want to do some task X amount of time to build a data structure. For loops aren't ideal because:
1) they have quirks (inclusive end bound, which is very error prone)
2) they are expressions that return Unit, so you need to use refs
I'd like something like
let myThing = Range.fold_left(10, [], (acc, i) => [i, ...acc]);
Often times I want to do some task X amount of time to build a data structure. For loops aren't ideal because: 1) they have quirks (inclusive end bound, which is very error prone) 2) they are expressions that return Unit, so you need to use refs
I'd like something like
for example
cc @schmavery