; 20241007 R.v.Vessum converted python source to metta ; FILE: 40../../../hyperon-experimental/python/tests/test_examples.py :44 ;
(= (remove-st $var) (match &self (state $var $y) (remove-atom &self (state $var $y)))) (= (change-st $var $value) (superpose ((remove-st $var) (add-atom &self (state $var $value))) ) ) ; (= (change-st $var $value) ; ((remove-st $var) ; (add-atom &self (state $var $value))) ) (= (get-st $var) (match &self (state $var $value) $value)) !(change-st (name id-001) Fritz) ; !(remove-st (name id-001) ) ;!(remove-st id-001 ) ; ready works ;!(assertEqualToResult (get-st (name id-001) ) ( Fritz ) ) ; (get-st (name id-001)) [[S('Fritz'     ) ;
;!(change-st (name id-001) Fritz) ;;
; 11. 20241007 R.v.Vessum converted python source to metta ;!(assertEqualToResult (get-st (name id-001)) [[S('Fritz'     ) ;;
;!(change-st (name id-001) Sam) ;;
; 12. 20241007 R.v.Vessum converted python source to metta ;!(assertEqualToResult (get-st (name id-001)) [[S('Sam'     ) ;;