PasteRack.org
Paste # 69930
2018-09-30 09:45:04

Forked from paste # 55553.

Fork as a new paste.

Paste viewed 363 times.


Embed:

  1. #lang scheme
  2.  
  3. (define x -2)
  4. (if (<= x 3) 2 (> x 3) (- (expt x 2) (* 3 x)))
  5. (define x 1)
  6. (if (<= x 3) 2 (> x 3) (- (expt x 2) (* 3 x)))
  7. (define x 3)
  8. (if (<= x 3) 2 (> x 3) (- (expt x 2) (* 3 x)))
  9. (define x 5)
  10. (if (<= x 3) 2 (> x 3) (- (expt x 2) (* 3 x)))
  11. (define x 10)
  12. (if (<= x 3) 2 (> x 3) (- (expt x 2) (* 3 x)))
  13.  
  14.  
  15. (define (function x) (if (<= x 3) 2 (> x 3) (- (expt x 2) (* 3 x))))
  16.  
  17.   (function -2)
  18.   (function 1)
  19.   (function 3)
  20.   (function 5)
  21.   (function 10)
  22.  

=>

eval:3:0: if: bad syntax;

 has 4 parts after keyword

  in: (if (<= x 3) 2 (> x 3) (- (expt x 2) (* 3 x)))

eval:5:0: if: bad syntax;

 has 4 parts after keyword

  in: (if (<= x 3) 2 (> x 3) (- (expt x 2) (* 3 x)))

eval:7:0: if: bad syntax;

 has 4 parts after keyword

  in: (if (<= x 3) 2 (> x 3) (- (expt x 2) (* 3 x)))

eval:9:0: if: bad syntax;

 has 4 parts after keyword

  in: (if (<= x 3) 2 (> x 3) (- (expt x 2) (* 3 x)))

eval:11:0: if: bad syntax;

 has 4 parts after keyword

  in: (if (<= x 3) 2 (> x 3) (- (expt x 2) (* 3 x)))

eval:12:0: if: bad syntax;

 has 4 parts after keyword

  in: (if (<= x 3) 2 (> x 3) (- (expt x 2) (* 3 x)))

function: undefined;

 cannot reference an identifier before its definition

  in module: 'm

function: undefined;

 cannot reference an identifier before its definition

  in module: 'm

function: undefined;

 cannot reference an identifier before its definition

  in module: 'm

function: undefined;

 cannot reference an identifier before its definition

  in module: 'm

function: undefined;

 cannot reference an identifier before its definition

  in module: 'm