Hi.
I came across one little issue with the blank values
Not very often i get this, but it does happens that the blank values NOT REALLY BLANK (ie spaces "", " ", " "),
what make this so difficult is that its not consistent. ie blank with no space, blank with 1 or 2 or more spaces.
I tried to mod the (foo) function to include the "OR" operator, but it might not be able to cover all combinations.
So how would i make it foolproof regardless of blank values with spaces or not?
(defun foo ( lst )
(cond
( (null (cddr lst))
(if (or (/= "" (cdadr lst))
(/= " " (cdadr lst))) (cdr lst) lst)
)
( (or
(and (eq "" (cdadr lst)) (eq "" (cdaddr lst)))
(and (eq " " (cdadr lst)) (eq " " (cdaddr lst)))
)
(list (car lst) (cadr lst))
)
( (foo (cdr lst)))
)
)
Thankyou