def function_exists(name)
      assert_type name, :String, :name
      exists = Sass::Script::Functions.callable?(name.value.tr("-", "_"))
      exists ||= environment.caller.function(name.value)
      bool(exists)
    end
def function_exists(name)
      assert_type name, :String, :name
      exists = Sass::Script::Functions.callable?(name.value.tr("-", "_"))
      exists ||= environment.caller.function(name.value)
      bool(exists)
    end
Check whether a function with the given name exists.

 @example
   function-exists(lighten) => true

   @function myfunc { @return "something"; }
   function-exists(myfunc) => true

 @overload function_exists($name)
   @param name [Sass::Script::Value::String] The name of the function to
     check or a function reference.
 @return [Sass::Script::Value::Bool] Whether the function is defined.