結果 : algorithm2e define function