Diff
Not logged in

Differences From Artifact [6911dbe256744186]:

To Artifact [f71ff7dc6628e423]:


78 t2.set(s.data, ValueLayer, v); 78 t2.set(s.data, ValueLayer, v); 79 return t2; 79 return t2; 80 }); 80 }); 81 e.addPrimitive("{}", ValueLayer, (){ 81 e.addPrimitive("{}", ValueLayer, (){ 82 return new Table; 82 return new Table; 83 }); 83 }); 84 // IO and others 84 // IO and others 85 e.addPrimitive("print", ValueLayer, (Value a){ writeln(a); return new In | 85 e.addPrimitive("print", ValueLayer, (Value a){ writeln(a); return a; }); 86 e.addPrimitive("gensym", ValueLayer, (){ return new StrValue(freshVarNam 86 e.addPrimitive("gensym", ValueLayer, (){ return new StrValue(freshVarNam 87 auto rand = Mt19937(unpredictableSeed); 87 auto rand = Mt19937(unpredictableSeed); 88 e.addPrimitive("rand", ValueLayer, (IntValue n){ 88 e.addPrimitive("rand", ValueLayer, (IntValue n){ 89 return new IntValue( uniform(0,cast(int)n.data.toInt(),rand) ); 89 return new IntValue( uniform(0,cast(int)n.data.toInt(),rand) ); 90 }); 90 }); 91 } 91 }