| Did you know ... | Search Documentation: |
| Get methods |
send operations available as get operations so
that the receiving number is not modified:
?- new(N, number(2)), get(N, plus, 3, N2), get(N2, value, V2). V2 = 5 N2 = @1687003/number N = @1686999/number
First creates a new number
object with the same number<-value,
invokes the method as a send method and, if the send succeeds, returns
the copy.
|number|real -> {smaller,equal,larger}smaller implies the
receiver is smaller than the argument. Intended to support chain->sort
and friends. To sort a chain of integers by value:
send(Chain, sort, ?(@arg1, compare, @arg2)).