24 lines
410 B
Java
24 lines
410 B
Java
|
package serene.simple.builtin;
|
||
|
|
||
|
import serene.simple.BaseScope;
|
||
|
|
||
|
|
||
|
public class PrintlnFn extends AFn {
|
||
|
public String fnName() {
|
||
|
return "println";
|
||
|
};
|
||
|
|
||
|
public Object eval(BaseScope scope) {
|
||
|
String output = "";
|
||
|
|
||
|
for(Object x: this.arguments()) {
|
||
|
output = String.format(
|
||
|
"%s %s", output,
|
||
|
(String) x.toString());
|
||
|
}
|
||
|
|
||
|
System.out.println(output);
|
||
|
return null;
|
||
|
}
|
||
|
}
|