問題 3.25 (record, branch, tableで抽象化の途中)