Task

Demonstrate any means your language has to prevent the modification of values, or to create objects that cannot be modified after they have been created.




type im_string
 
val create : int -> im_string
val make : int -> char -> im_string
val of_string : string -> im_string
val to_string : im_string -> string
val copy : im_string -> im_string
val sub : im_string -> int -> int -> im_string
val length : im_string -> int
val get : im_string -> int -> char
val iter : (char -> unit) -> im_string -> unit
val escaped : im_string -> im_string
val index : im_string -> char -> int
val contains : im_string -> char -> bool
val print : im_string -> unit