I tried to pass a string in to get a reversed string. Why can't I do this:
let rec reverse x = match x with | "" -> "" | e ^ s -> (reverse s) ^ e;;
The compiler says it's a syntax error. Can't I use ^
to destructure parameters?
I tried to pass a string in to get a reversed string. Why can't I do this:
let rec reverse x = match x with | "" -> "" | e ^ s -> (reverse s) ^ e;;
The compiler says it's a syntax error. Can't I use ^
to destructure parameters?