From: Chris Hanson Date: Thu, 31 Mar 2005 18:55:57 +0000 (+0000) Subject: Add REGION? predicate. X-Git-Tag: 20090517-FFI~1339 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=8d5296fcb53ae356eb62a80204c82d464e51635d;p=mit-scheme.git Add REGION? predicate. --- diff --git a/v7/src/edwin/struct.scm b/v7/src/edwin/struct.scm index 69a281e1a..a7201c339 100644 --- a/v7/src/edwin/struct.scm +++ b/v7/src/edwin/struct.scm @@ -1,9 +1,9 @@ #| -*-Scheme-*- -$Id: struct.scm,v 1.98 2003/02/14 18:28:13 cph Exp $ +$Id: struct.scm,v 1.99 2005/03/31 18:55:57 cph Exp $ Copyright 1985,1989,1990,1991,1992,1993 Massachusetts Institute of Technology -Copyright 1994,1999,2000,2001,2003 Massachusetts Institute of Technology +Copyright 1994,1999,2000,2001,2003,2005 Massachusetts Institute of Technology This file is part of MIT/GNU Scheme. @@ -627,6 +627,12 @@ USA. (else (%make-region end start)))) +(define (region? object) + (and (pair? object) + (mark? (car object)) + (mark? (cdr object)) + (mark<= (car object) (cdr object)))) + (define-integrable (region-group region) (mark-group (region-start region)))