#lang scheme
(require mzlib/defmacro)
(define intervalo
  (lambda (a b)
    (if (> a b)
        '()
        (cons a
              (intervalo (add1 a) b))) ))
(define-macro tiempo-de
  (lambda (expr)
    (let ((t-inicial (current-milliseconds)))
      `(begin
         ,@expr
         (- (current-milliseconds) ,t-inicial)) ) ))

;(tiempo-de (intervalo 1 10000))

(define-macro si
  (lambda (test verdad falso)
    `(if 
      ,test
      (cons begin ,@verdad)
      (cons begin ,@falso)) ))

(let ((a 10)
      (b 20)
      )
  (si (> a b)
      ((printf "~a ~a~n" a b) (+ a b))
      ((printf "~a ~a~n" a b) (* a b))))
(define si
  (lambda (test T F)
    (list
     'if 
     test
     (cons 'begin T)
     (cons 'begin F))
    ))