def linkhandle(urls,prefix)
arr=[]
for url in urls
arr.push(prefix+url)
end
reuturn arr
end
def process(handle,prefix="https://")
urls=['./201207/t20120705_1887040.html', './201206/t20120608_1846662.html']
links = handle(urls,prefix);
return links;
end
list= process(linkhandle,'http://www.baidu.com')
print list.join("\n")
如何才能在 process 中传入一个处理链接的函数,根据传入不同的域名得到相应的链接