(deffacts dane (lista -2 3 -7 9 11 -20 19 6 -1) (length 0) ) (defrule dlugosc ?i<-(lista ?x $?reszta) ?ii<-(length ?ile) => (retract ?i ?ii) (assert (lista $?reszta)) (assert (length (+ ?ile 1))) )