       queryTerms = [ terms.split(" ")..., queryTerms... ]
       prefix = "#{terms} "
 
-      @postprocessSuggestions =
-        (suggestions) ->
-          for suggestion in suggestions
-            continue unless suggestion.startsWith prefix
-            suggestion[prefix.length..]
+      @postprocessSuggestions = (suggestions) ->
+        suggestions.filter((s) => s.startsWith(prefix)).map((s) => s[prefix.length..])
 
     @engine.getUrl queryTerms
 

    else
      for engine in CompletionEngines
        engine = new engine()
        return @engineCache.set searchUrl, engine if engine.match searchUrl

  # True if we have a completion engine for this search URL, false otherwise.
  haveCompletionEngine: (searchUrl) ->

    callback ?= (suggestions) -> suggestions

    # We don't complete queries which are too short: the results are usually useless.
    return callback [] unless query.length >= 3

    # We don't complete regular URLs or Javascript URLs.
    if queryTerms.length == 1 and Utils.isUrl query
      return callback []
    if Utils.hasJavascriptPrefix query
      return callback []

    completionCacheKey = JSON.stringify [ searchUrl, queryTerms ]
    if @completionCache.has completionCacheKey
      if @debug
        console.log "hit", completionCacheKey
      return callback @completionCache.get completionCacheKey

    # If the user appears to be typing a continuation of the characters of the most recent query, then we can
