* more cleanup in pairs.ss
This commit is contained in:
		
							parent
							
								
									0e1fcc18c3
								
							
						
					
					
						commit
						c8e60f84da
					
				
							
								
								
									
										
											BIN
										
									
								
								src/ikarus.boot
								
								
								
								
							
							
						
						
									
										
											BIN
										
									
								
								src/ikarus.boot
								
								
								
								
							
										
											Binary file not shown.
										
									
								
							| 
						 | 
					@ -33,10 +33,6 @@
 | 
				
			||||||
        (error 'set-cdr! "~s is not a pair" x))
 | 
					        (error 'set-cdr! "~s is not a pair" x))
 | 
				
			||||||
      ($set-cdr! x y)))
 | 
					      ($set-cdr! x y)))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  (define err
 | 
					 | 
				
			||||||
    (lambda (who x)
 | 
					 | 
				
			||||||
      (error who "invalid list structure ~s" x)))
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  (define-syntax cxr
 | 
					  (define-syntax cxr
 | 
				
			||||||
    (syntax-rules ()
 | 
					    (syntax-rules ()
 | 
				
			||||||
      [(_ err $car/$cdr) 
 | 
					      [(_ err $car/$cdr) 
 | 
				
			||||||
| 
						 | 
					@ -53,7 +49,9 @@
 | 
				
			||||||
      [(_ [name* ops** ...] ...)
 | 
					      [(_ [name* ops** ...] ...)
 | 
				
			||||||
       (begin
 | 
					       (begin
 | 
				
			||||||
         (define name*
 | 
					         (define name*
 | 
				
			||||||
           (lambda (x) ((cxr (err 'name* x) ops** ...) x)))
 | 
					           (lambda (x) 
 | 
				
			||||||
 | 
					             ((cxr (error 'name* "invalid list structure ~s" x) ops** ...)
 | 
				
			||||||
 | 
					              x)))
 | 
				
			||||||
         ...)]))
 | 
					         ...)]))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  (define-cxr*
 | 
					  (define-cxr*
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue