Skip to main content
deleted 15 characters in body
Source Link
rnso
  • 1.7k
  • 10
  • 8

Racket 164159 bytes

(let((d display))(let p((n 2)(x 0)(t 0)(d display))(when(> x 69)(d"\n")(set! x 0))(cond[(> t 699)
(d"\n")][(> n 2)(d"|")(p 0(+ 1 x)(+ 1 t)d)][(d"_")(p(+ 1 n)(+ 1 x)(+ 1 t)d)])))

Ungolfed:

(define (f)
  (let ((d display))
  (let loop ((n 2)   (x 0)   (t 0)  (d display))
    
    (when (> x 69)  (d "\n")
                    (set! x 0))
    (cond
      [(> t 699)    (d "\n")]
      
      [(> n 2)      (d "|")
                    (loop    0    (+ 1 x) (+ 1 t) d)]

      [else         (d "_")
                    (loop (+ 1 n) (+ 1 x) (+ 1 t) d)]
      ))))

Testing:

(f)

Output:

_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__

Racket 164 bytes

(let((d display))(let p((n 2)(x 0)(t 0))(when(> x 69)(d"\n")(set! x 0))(cond[(> t 699)
(d"\n")][(> n 2)(d"|")(p 0(+ 1 x)(+ 1 t))][(d"_")(p(+ 1 n)(+ 1 x)(+ 1 t))])))

Ungolfed:

(define (f)
  (let ((d display))
  (let loop ((n 2)   (x 0)   (t 0))
    
    (when (> x 69)  (d "\n")
                    (set! x 0))
    (cond
      [(> t 699)    (d "\n")]
      
      [(> n 2)      (d "|")
                    (loop    0    (+ 1 x) (+ 1 t))]

      [else         (d "_")
                    (loop (+ 1 n) (+ 1 x) (+ 1 t))]
      ))))

Testing:

(f)

Output:

_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__

Racket 159 bytes

(let p((n 2)(x 0)(t 0)(d display))(when(> x 69)(d"\n")(set! x 0))(cond[(> t 699)
(d"\n")][(> n 2)(d"|")(p 0(+ 1 x)(+ 1 t)d)][(d"_")(p(+ 1 n)(+ 1 x)(+ 1 t)d)]))

Ungolfed:

(define (f)
  (let loop ((n 2)   (x 0)   (t 0)  (d display))
    
    (when (> x 69)  (d "\n")
                    (set! x 0))
    (cond
      [(> t 699)    (d "\n")]
      
      [(> n 2)      (d "|")
                    (loop    0    (+ 1 x) (+ 1 t) d)]

      [else         (d "_")
                    (loop (+ 1 n) (+ 1 x) (+ 1 t) d)]
      )))

Testing:

(f)

Output:

_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
added 2 characters in body
Source Link
rnso
  • 1.7k
  • 10
  • 8

Racket 168164 bytes

(let((d display))(let p((n 2)(x 0)(t 0))(when(> x 69)(d"\n")(set! x 0))(cond[(> t 699)
(d"\n")][(> n 2)(d"|")(p 0(+ 1 x)(+ 1 t))][else][(d"_")(p(+ 1 n)(+ 1 x)(+ 1 t))])))

Ungolfed:

(define (f)
  (let ((d display))
  (let loop ((n 2)
         (x 0)   (xt 0))
     
    (when (> x 69)  (td 0)"\n")
    (when (> x 69)
      (d "\n")
      (set! x 0))
    (cond
      [(> t 699)    (d "\n")]
      
      [(> n 2)      (d "|")
                    (loop    0    (+ 1 x) (+ 1 t))]

      [else         (d "_")
                    (loop (+ 1 n) (+ 1 x) (+ 1 t))]
      ))))

Testing:

(f)

Output:

_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__

Racket 168 bytes

(let((d display))(let p((n 2)(x 0)(t 0))(when(> x 69)(d"\n")(set! x 0))(cond[(> t 699)
(d"\n")][(> n 2)(d"|")(p 0(+ 1 x)(+ 1 t))][else(d"_")(p(+ 1 n)(+ 1 x)(+ 1 t))])))

Ungolfed:

(define (f)
  (let ((d display))
  (let loop ((n 2)
             (x 0)
             (t 0))
    (when (> x 69)
      (d "\n")
      (set! x 0))
    (cond
      [(> t 699)    (d "\n")]
      
      [(> n 2)      (d "|")
                    (loop 0 (+ 1 x) (+ 1 t))]

      [else         (d "_")
                    (loop (+ 1 n) (+ 1 x) (+ 1 t))]
      ))))

Testing:

(f)

Output:

_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__

Racket 164 bytes

(let((d display))(let p((n 2)(x 0)(t 0))(when(> x 69)(d"\n")(set! x 0))(cond[(> t 699)
(d"\n")][(> n 2)(d"|")(p 0(+ 1 x)(+ 1 t))][(d"_")(p(+ 1 n)(+ 1 x)(+ 1 t))])))

Ungolfed:

(define (f)
  (let ((d display))
  (let loop ((n 2)   (x 0)   (t 0))
     
    (when (> x 69)  (d "\n")
                    (set! x 0))
    (cond
      [(> t 699)    (d "\n")]
      
      [(> n 2)      (d "|")
                    (loop    0    (+ 1 x) (+ 1 t))]

      [else         (d "_")
                    (loop (+ 1 n) (+ 1 x) (+ 1 t))]
      ))))

Testing:

(f)

Output:

_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
Source Link
rnso
  • 1.7k
  • 10
  • 8

Racket 168 bytes

(let((d display))(let p((n 2)(x 0)(t 0))(when(> x 69)(d"\n")(set! x 0))(cond[(> t 699)
(d"\n")][(> n 2)(d"|")(p 0(+ 1 x)(+ 1 t))][else(d"_")(p(+ 1 n)(+ 1 x)(+ 1 t))])))

Ungolfed:

(define (f)
  (let ((d display))
  (let loop ((n 2)
             (x 0)
             (t 0))
    (when (> x 69)
      (d "\n")
      (set! x 0))
    (cond
      [(> t 699)    (d "\n")]
      
      [(> n 2)      (d "|")
                    (loop 0 (+ 1 x) (+ 1 t))]

      [else         (d "_")
                    (loop (+ 1 n) (+ 1 x) (+ 1 t))]
      ))))

Testing:

(f)

Output:

_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__