From f7e43506bbc2cfa3793489842a214f4bc0200f11 Mon Sep 17 00:00:00 2001 From: interp Date: Fri, 29 Mar 2002 16:44:04 +0000 Subject: [PATCH] make safe-second really safe (don't loose on an empty list) --- ecm-utilities.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ecm-utilities.scm b/ecm-utilities.scm index e68ed8a..4ecf3ee 100644 --- a/ecm-utilities.scm +++ b/ecm-utilities.scm @@ -1,6 +1,6 @@ ;; ecm-utilities.scm -- Utility procedures for ecm-net code ;; -;; $Id: ecm-utilities.scm,v 1.3 2001/12/18 18:08:08 interp Exp $ +;; $Id: ecm-utilities.scm,v 1.4 2002/03/29 16:44:04 interp Exp $ ;; ;; Please send suggestions and bug reports to @@ -29,7 +29,7 @@ ;; prefer this to :optional (define (safe-first x) (and (not (null? x)) (car x))) -(define (safe-second x) (and (not (null? (cdr x))) (cadr x))) +(define (safe-second x) (and (not (null? x)) (not (null? (cdr x))) (cadr x))) (define (write-crlf port) (write-string "\r\n" port)