builtins
This commit is contained in:
@@ -319,7 +319,10 @@ func applyFunction(fn object.Object, args []object.Object) object.Object {
|
||||
return unwrapReturnValue(evaluated)
|
||||
|
||||
case *object.Builtin:
|
||||
return fn.Fn(args...)
|
||||
if result := fn.Fn(args...); result != nil {
|
||||
return result
|
||||
}
|
||||
return NULL
|
||||
|
||||
default:
|
||||
return newError("not a function: %s", fn.Type())
|
||||
|
||||
Reference in New Issue
Block a user