PasteRack.org
Paste # 8121
2019-04-11 10:48:40

Fork as a new paste.

Paste viewed 333 times.


Embed:

  1. #lang racket
  2. ;;repeat : symbol natural -> los
  3. ;;produce a list with symbols
  4. (define (repeat symbol natural)
  5.   (cond
  6.    [(zero? n) empty]
  7.    [else (cons symbol ( repeat symbol (sub1 natural)))]))
  8. (repeat bets 3)

=>

bets: undefined;

 cannot reference an identifier before its definition

  in module: 'm