public static bool IsList(PrologCodeTerm term) { if(term is PrologCodeNonEmptyList || term is PrologCodeEmptyList) { return true; } return false; }