to_string


to_string(obj)
      

Return a string representation of obj.

To_string is a generic function by default and can be overridden for custom data types without an explicit declare generic.

Examples:


string_append(to_string([1, 2, 3]), "123")
// [1, 2, 3]123

function point(x, y)
  ^(message)
  | 'to_string -> ^() string_append(number_to_string(x), "@", number_to_string(y))

let p = point(10, 20)
to_string(p)
// 10@20
      

Core Module Index | Contents