What is the function of 走 in 假如借走回家看?
In Chinese, very often there is an adverb following a verb, which can be treated as a compound verb. For example,
(1) 那件大衣被别人拿走了. = Someone else took away that coat.
(2) 这本书不能从图书馆借出去. = You cannot take this book out of the library.
(3) 那个老房子已经被拆掉了. = The old house has been demolished.
You can understand the combinations just as the English phrases, such as "put on", "turn off", or "give up".
Sometimes, you can omit the adverb, but sometimes you cannot. For example,
(把书)借走回家看. = (把书)借回家看. = You borrow the book and take it home to read.
他们把房子拆掉了. = 他们把房子拆了. = They took down the house.
我们爬上了那座山. = We summited that mountain.
我们爬了那座山. = We climbed that mountain. (not necessary to the peak).