PasteRack.org
Paste # 55553
2018-09-30 09:39:29

Fork as a new paste.

Paste viewed 33 times.


Embed:

  1. #lang scheme
  2.  
  3. (define (function x) (if (<= x 3) 2 (> x 3) (- (expt x 2) (* 3 x))))
  4.  
  5.   (function -2)
  6.   (function 1)
  7.   (function 3)
  8.   (function 5)
  9.   (function 10)

=>

eval:2: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