@Doc("Reads the contents of the file as a string.")
public static class Read implements Intrinsic {
public Obj invoke(Context context, Obj left, Obj right) {
FileReader reader = (FileReader)left.getValue();
try {
String contents = reader.readAll();
if (contents == null) return context.nothing();
return context.toObj(contents);
} catch (IOException e) {
throw context.error("IOError", "Could not read.");
}