Thank you for your comment

Beau­tiful Racket / explainers

  1. (report (* 1 2 3 4))
    1
    (report (* 1 2 3 4))
    
    copy to clipboard
    (define-macro (report EXPR)
      #'(begin
          ; EXPR used as literal data, and quoted as a datum
          (displayln (format "input was ~a" 'EXPR))
          EXPR)) ; EXPR used for its result
    (report (* 1 2 3 4))
    1
    2
    3
    4
    5
    6
    (define-macro (report EXPR)
      #'(begin
          ; EXPR used as literal data, and quoted as a datum
          (displayln (format "input was ~a" 'EXPR))
          EXPR)) ; EXPR used for its result
    (report (* 1 2 3 4))
    
    copy to clipboard
    (report (* 1 2 3 4))
    1
    (report (* 1 2 3 4))
    
    copy to clipboard
    input was (* 1 2 3 4)
    24
    1
    2
    input was (* 1 2 3 4)
    24
    
    copy to clipboard
← prev next →