سلام و عرض ادب
امکانش هست راهنماییم کنید که مشکل برنامه ی زیر که به زبان لیسپه چیه؟
(DEFUN EQUALSIDES (P)
(ALLEQUAL (SIDE_LENGHT_SQ_LIST P)))
(DEFUN SIDE_LENGHT_SQ_LIST (P)
(PROG (FIRST_PT)
(SETQ FIRST_PT (CAR P))
(RETURN (SLSL P))))
(DEFUN SLSL (P)
(COND ((NULL (CDR P))
(LIST (PLUS (SQ (DX FIRST_PT ((CAR P)))
(SQ (DY FIRST_PT ((CAR P))))))
(T (CONS
(PLUS (SQ (DX (CADR P) (CAR P)))
(SQ (DY (CADR P) (CAR P))))
(SISI (CDR P))))))
(DEFUN SQ (N) (TIMES N N))
(DEFUN ALLEQUAL (L)
(APPLY 'AND
(MAPCAR '( (LAMBDA (XX) (EQUAl XX (CAR L)))
(CDR L))))
|