結果 : what is a path function and state function