PasteRack.org
Paste # 47002
2018-10-30 03:38:13

Fork as a new paste.

Paste viewed 2664 times.


Embed:

dumb thing

  1. #lang racket
  2. (define (xs->image total some-xs foreground background)
  3.   (Local [(define (represent x) (if (element? x some-xs) ground) (else barrier))])
  4.   (define (T image n) (if (= n total) image) (else (T (beside image (represent (+ n 1))) (+ n 1))))
  5.   (T (represent 0) 0))

=>

eval:2:0: define: not allowed in an expression context

  in: (define (represent x) (if (element? x some-xs) ground)

(else barrier))