PasteRack.org
Paste # 6561
2019-04-25 11:24:22

Fork as a new paste.

Paste viewed 49 times.


Embed:

  1. #lang racket
  2. ;;valor-hora : lon lon -> lon
  3. ;;
  4. (define (hora-salario valor-hora tempo)
  5.   (cond
  6.    [(empty? valor-hora) empty]
  7.    [else (cons (* (first valor-hora) (first tempo)) (hora-salario (rest valor-hora) (rest tempo)))]))
  8. (hora-salario (cons 10(cons 5 ermpty)) (cons 50 (cons 20 empty)))

=>

ermpty: undefined;

 cannot reference an identifier before its definition

  in module: 'm