start moving numbers to oop

This commit is contained in:
2024-07-09 14:05:21 +01:00
parent 3761070e82
commit 7c23db80d4
11 changed files with 333 additions and 242 deletions

View File

@@ -58,9 +58,7 @@ func getkeyCache(getKey func(any) (any, ArErr), key any) (any, ArErr) {
}
func compare(a, b any) (bool, error) {
if isAnyNumber(a) && isAnyNumber(b) {
return a.(number).Cmp(b.(number)) < 0, nil
} else if x, ok := a.(ArObject); ok {
if x, ok := a.(ArObject); ok {
if y, ok := x.obj["__LessThan__"]; ok {
resp, err := runCall(
call{