Given this rule:

is_digit(C) :- memberchk(C, "0123456789").

which used to use "member",

and given that I intend to be parsing a source language read from a
file into a character list, what would be the more correct /
appropriate one to use and why?

I know that member() can backtrack and therefore be used to iterate
over a list but is that useful / relevant in my example rule ?

Thanks,
Sean.

_______________________________________________
Users-prolog mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/users-prolog

Reply via email to