結果 : differentiate between state function and path function with examples