[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Difference between memberchk/2 and member/2...
From: |
emacstheviking |
Subject: |
Difference between memberchk/2 and member/2... |
Date: |
Fri, 19 Jul 2013 15:37:24 +0100 |
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.
- Difference between memberchk/2 and member/2...,
emacstheviking <=