RosettaCodeData/Task/Four-bit-adder/Haskell/four-bit-adder-1.hs

9 lines
134 B
Haskell

import Control.Arrow
import Data.List (mapAccumR)
bor, band :: Int -> Int -> Int
bor = max
band = min
bnot :: Int -> Int
bnot = (1-)