let a = M.lookup "a" table in if isJust a then Just (1 + (fromJust a)) else Nothing aPlus1 -- => Just 3 a が Justか確認 Just をはずして1を足す a がなかった場合と区別するために Justをつける
M.lookup "a" table of Nothing -> Nothing Just a -> case M.lookup "b" table of Nothing -> Nothing Just b -> Just (a + b) -- Just Just と Nothingの確認をひたすら…
= case M.lookup "a" table of Nothing -> Nothing Just a -> case M.lookup "b" table of Nothing -> Nothing Just b -> case M.lookup "c" table of Nothing -> Nothing Just c -> Just $ a + b + c
= case M.lookup "a" table of Nothing -> Nothing Just a -> case M.lookup "b" table of Nothing -> Nothing Just b -> case M.lookup "c" table of Nothing -> Nothing Just c -> Just $ a + b + c Just と Nothingの確認をひたすら…
table of Nothing -> Nothing Just a -> case M.lookup "b" table of Nothing -> Nothing Just b -> case M.lookup "c" table of Nothing -> Nothing Just c -> Just $ a + b + c
-> case mB of [] -> [] xb:xbs -> go ((\b -> case mC of [] -> [] x:xs -> go ((\c -> a + b + c) x) (xs >>= (\c -> a + b + c)) where go [] acc = acc go (y:ys) acc = y : (go ys acc) ) xb) (xbs >>= (\b -> case mC of [] -> [] x:xs -> go ((\c -> a + b + c) x) (xs >>= (\c -> a + b + c)) where go [] acc = acc go (y:ys) acc = y : (go ys acc) )) where gob [] accb = accb gob (yb:ybs) accb = y : (go ybs accb) ) xa) (xas >>= (\a -> )) where go [] acca = acca
-> case mB of [] -> [] xb:xbs -> go ((\b -> case mC of [] -> [] x:xs -> go ((\c -> a + b + c) x) (xs >>= (\c -> a + b + c)) where go [] acc = acc go (y:ys) acc = y : (go ys acc) ) xb) (xbs >>= (\b -> case mC of [] -> [] x:xs -> go ((\c -> a + b + c) x) (xs >>= (\c -> a + b + c)) where go [] acc = acc go (y:ys) acc = y : (go ys acc) )) where gob [] accb = accb gob (yb:ybs) accb = y : (go ybs accb) ) xa) (xas >>= (\a -> )) where go [] acca = acca イメージです。