Implement step A
[jackhill/mal.git] / chuck / types / mal / MalString.ck
1 public class MalString extends MalObject
2 {
3 "string" => type;
4
5 fun string value()
6 {
7 return (object$String).value;
8 }
9
10 fun void init(string value)
11 {
12 String.create(value) @=> object;
13 }
14
15 fun static MalString create(string value)
16 {
17 MalString m;
18 m.init(value);
19 return m;
20 }
21
22 fun MalObject clone()
23 {
24 MalString value;
25
26 this.type => value.type;
27 this.object @=> value.object;
28 this.objects @=> value.objects;
29 this.meta @=> value.meta;
30
31 return value;
32 }
33 }