add when and unless macros
This commit is contained in:
		
							parent
							
								
									fc42c71304
								
							
						
					
					
						commit
						d0d3feeb4b
					
				| 
						 | 
				
			
			@ -115,6 +115,12 @@
 | 
			
		|||
 | 
			
		||||
(define else #t)
 | 
			
		||||
 | 
			
		||||
(define-macro (when test . exprs)
 | 
			
		||||
  (list 'if test (cons 'begin exprs) #f))
 | 
			
		||||
 | 
			
		||||
(define-macro (unless test . exprs)
 | 
			
		||||
  (list 'if test #f (cons 'begin exprs)))
 | 
			
		||||
 | 
			
		||||
(define-macro (and . exprs)
 | 
			
		||||
  (if (null? exprs)
 | 
			
		||||
      #t
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue