How to split a string into a list of characters in F sharp, for example, if I want to split the word "Hello" into a list of characters, i.e.
"Hello" ->['H';'e';'l';'l';'o']
I tried Split ([| |]) , but it only breaks the string depending on the u pass parameter.
I tried this but it still didn't work
let splitChar (text:string) =
[for c in text ->c]
let splitChar (text:string) =
[for c in text do yield c]
source
share