 
   # Tries to detect if :str is a valid URL.
   isUrl: (str) ->
-    # More or less RFC compliant URL host part parsing. This should be
-    # sufficient for our needs
+    # More or less RFC compliant URL host part parsing. This should be sufficient for our needs
     urlRegex = new RegExp(
       # user:password (optional)     => \1, \2
       '^(?:([^:]+)(?::([^:]+))?@)?' +

    # Must not contain spaces
    return false if ' ' in str

    # Try to parse the URL into its meaningful parts. If matching fails we're
    # pretty sure that we don't have some kind of URL here.
    match = urlRegex.exec (str.split '/')[0]
    return false unless match
    hostName = match[3]

    else
      Utils.createSearchUrl string

# This creates a new function out of an existing function, where the new function takes fewer arguments. This
# allows us to pass around functions instead of functions + a partial list of arguments.
Function::curry = ->
  fixedArguments = Array.copy(arguments)
  fn = this
