Searches for a buffer of type type using pred as a predicate. pred is passed each buffer's name and buffer object; if the name passed to pred is #f, then the get-filename method of the buffer should be used to get the buffer's name. A buffer object is returned if one can be found. If no buffer is found, then otherwise is invoked (with no arguments) to obtain a result. The otherwise argument is optional; it defaults to a procedure that returns #f.