PasteRack.org
Paste # 61640
2026-04-20 20:49:53

Fork as a new paste.

Paste viewed 77 times.


Embed:

Happy Birthday 4/20

  1. #lang racket
  2. (require 2htdp/image)
  3. (require lang/posn)
  4. (require srfi/1)
  5.  
  6. (define (swastika)
  7.   (overlay
  8.    (flip-horizontal
  9.     (rotate
  10.      45
  11.      (polygon (map (lambda (xy) (apply make-posn xy))
  12.                    '((0 0)
  13.                      (36 0)
  14.                      (36 24)
  15.                      (48 24)
  16.                      (48 0)
  17.                      (60 0)
  18.  
  19.                      (60 36)
  20.                      (36 36)
  21.                      (36 48)
  22.                      (60 48)
  23.                      (60 60)
  24.  
  25.                      (24 60)
  26.                      (24 36)
  27.                      (12 36)
  28.                      (12 60)
  29.                      (0 60)
  30.  
  31.                      (0 24)
  32.                      (24 24)
  33.                      (24 12)
  34.                      (0 12)))
  35.               "solid"
  36.               "black")))
  37.    (circle 45 "solid" "white")))
  38.  
  39. (define (germany1935)
  40.   (overlay
  41.     (swastika)
  42.     (rectangle 200 120 "solid" "red"))) ; 3:5 ratio (official)
  43.  
  44. (define s (scale (/ 1488 200) (germany1935 #:bg (make-color #x88 #x0d #x14 255))))
  45.  
  46. s ;; to our favorite Austrian Painter 

=>

application: procedure does not accept keyword arguments

  procedure: germany1935

  arguments...:

   #:bg (color 136 13 20 255)

s: undefined;

 cannot reference an identifier before its definition

  in module: 'm