On Sat, Jul 30, 2011 at 08:23:11PM -0300, TC-Rucho wrote:
> If it's about checking single characters, why not just:
> (de sub? (Ch Str)
> (member Ch (chop Str) )
> so rewriting this:
> (or (= X ",") (= X ".") (= X "?"))
> (sub? X ",.?")
> would work just fine.
Tight, this would work in the current situation.
However, I would not use this as a general implemenation of 'sub?' for
miniPicoLisp, as it is not equivalent to the other versions.
For the current problem, a simple inline replacement of
(or (= X ",") (= X ".") (= X "?"))
(member X '("," "." "?"))
would be the best.