I currently use this function
let inc (i : int ref) = let res = !i i := res + 1 res
to write things like
let str = input.[inc index]
How define increment operator ++, so that I could write
let str = input.[index++]
No comments:
Post a Comment