When solving the homework, strive to create not just code that works, but code that is readable and concise. Try to write small functions which perform just a single task, and then combine those ...
ただ,この例のように,持ち上げた関数を値に適用するためだけにMonadを使うのは大げさです。そこで,「値を持ち上げてコンテナに包む機能」と「持ち上げた関数を『コンテナに包まれた値』に適用する機能」を提供するのがApplicative(Applicative Functor)です。
When solving the homework, strive to create not just code that works, but code that is readable and concise. Try to write small functions which perform just a single task, and then combine those ...