DISABLE FDs (REMOVE ME).
[jackhill/mal.git] / chuck / func.ck
1 public class Func extends MalObject
2 {
3 "func" => type;
4 Env env;
5 string args[];
6 MalObject ast;
7 int isMacro;
8
9 fun void init(Env env, string args[], MalObject ast)
10 {
11 env @=> this.env;
12 args @=> this.args;
13 ast @=> this.ast;
14 }
15
16 fun static Func create(Env env, string args[], MalObject ast)
17 {
18 Func func;
19 func.init(env, args, ast);
20 return func;
21 }
22
23 fun MalObject clone()
24 {
25 Func value;
26
27 this.type => value.type;
28 this.env @=> value.env;
29 this.args @=> value.args;
30 this.ast @=> value.ast;
31 this.isMacro @=> value.isMacro;
32
33 return value;
34 }
35 }