private static abstract class Methods implements Intrinsic {
public Obj invoke(final Context context, Obj left, Obj right) {
final Obj matchingValue = getMatchingValueFromArgs(context, left, right);
DocBuilder docBuilder = new DocBuilder() {
@Override
protected boolean shouldDisplayMethod(Callable callable) {
return isMatchingMethod(matchingValue, context, callable);
}
};
for(Entry<String, Multimethod> multimethod : findMultimethods(context, matchingValue)) {
docBuilder.append(multimethod.getKey(), multimethod.getValue());
docBuilder.append("\n");
}
System.out.println(docBuilder.toString());
return context.nothing();
}