Concatenate lines in okamla with a new line in between
1 answer
String.concat "\n" [str1; str2 ... strn]
works great. The problem is what you used '\n'
, which is a character literal, not a string. Example:
# String.concat '\n' ["abc"; "123"];;
Error: This expression has type char but an expression was expected of type
string
# String.concat "\n" ["abc"; "123"];;
- : string = "abc\n123"
+8
source to share