The predicate default/3 provides a comfortable way to specify the meaning of default arguments. Future versions may incorporate the default value in the type object itself.
resource(<Object>, <Name>)
In which case the <-
resource_value: <Name>
from <Object> will be used as default value. Value
is unified with Argument if Argument is not @default
and with Default otherwise.
The following is an example that sets the volume to a specified value or the value of the resource `volume' if @default is passed as an argument.
resource(volume, 0..130, 75, "Volume in decibels"). volume(X, Vol:[0..130]) :-> default(Vol, resource(X, volume), V), <set the volume here>.