結果 : differentiate state function and path function with example