diff --git a/utils.go b/utils.go index 56ca6e3..ba1ec81 100644 --- a/utils.go +++ b/utils.go @@ -24,6 +24,11 @@ func IsFloat(v any) (ok bool) { return ok } +func IsBool(v any) (ok bool) { + _, ok = v.(bool) + return ok +} + func IsList(v any) (ok bool) { _, ok = v.(*ListType) return ok @@ -34,6 +39,11 @@ func IsDict(v any) (ok bool) { return ok } +func IsFract(v any) (ok bool) { + _, ok = v.(*fraction) + return ok +} + func IsNumber(v any) (ok bool) { return IsFloat(v) || IsInteger(v) }