While we are at it, take a look at this bit of code:
(if (and e f)
(list (cdr (assoc 10 (entget (car e))))
(cdr (assoc 11 (entget (car e))))
(cdr (assoc 10 (entget (car f))))
(cdr (assoc 11 (entget (car f))))
)
)
Because it is the last thing in the (sl subroutine what ever it returns, your subroutine will
also return that value. So if either e or f is nil the AND will return nil and the (if will return
nil, then your subroutine will return nil.
But, if there is a value in e AND f the list will be created and that will be returned to all.