Node:Method Additions, Next:Parameter Passing to New Objects, Previous:Object Creation, Up:Obj Dynamic
+SomeObject :: asserta(
+SomeMethod)
+SomeObject :: assertz(
+SomeMethod)
+SomeObject :: assert(
+SomeMethod)
Add some facts to vehicle
and truck
with initial value equal to
[]
.
| ?- vehicle :: assert(fuel_level([])), vehicle :: assert(oil_level([])), vehicle :: assert(location([])), truck :: assert(capacity([])), truck :: assert(total_weight([])). yes