Trees from functions as processes