;;;;;;;;;;;;;;;;;;;;;;;;;;; -*- Mode: Lisp -*- ;;;;;;;;;;;;;;;;;;;;;;;;;; (defstep hello-world () (skip-msg "Hello World") "Prints 'Hello World' and does nothing else" "Printing 'Hello World'" ) (defstep for (n step) (if (<= n 0) (skip) (let ((m (- n 1))) (then@ step (for m step)))) "Repeats step n times" "Repeating ~a times ~a" ) (defun get-form (fnum) (formula (car (select-seq (s-forms *goal*) fnum)))) (defstep both-sides-f (f &optional (fnum 1)) (let ((eqs (get-form fnum))) (if (equation? eqs) (let ((case-str (format nil "~a(~a) = ~a(~a)" f (args1 eqs) f (args2 eqs)))) (case case-str)) (skip))) "Applies function named F to both-sides of equality FNUM" "Applying ~a to both-sides of ~a")