tfwh-0.3.7.0
TFwH.Chap02.ExA
Description
第2章 練習問題 A
問:2足す2の半分は2かそれとも3か 答:そのとおり
Synopsis
problem' :: Int Source #
problem' = 2 + (2 div 2)
div
problem'' :: Int Source #
problem'' = (2 + 2) div 2
answer' :: Int Source #
answer' = 3
answer'' :: Int Source #
answer'' = 2
answer :: Bool Source #
answer = (problem' == answer' || problem' == answer'' ) && (problem'' == answer' || problem'' == answer'' )
>>> answer True
>>>
answer