performAction2 :: Action -> Brightness -> Brightness
performAction2 = curry $ \case
  (Toggle, b)  -> b + 2
  (TurnOn, b)  -> b + 1
  (TurnOff, 0) -> 0
  (TurnOff, b) -> b - 1

-- Parsing commands
performAction2 :: Action -> Brightness -> Brightness
performAction2 = curry $ \case
  (Toggle, b)  -> b + 2
  (TurnOn, b)  -> b + 1
  (TurnOff, 0) -> 0
  (TurnOff, b) -> b - 1

-- Parsing commands
performAction2 = curry $ \case
  (Toggle, b)  -> b + 2
  (TurnOn, b)  -> b + 1
  (TurnOff, 0) -> 0
  (TurnOff, b) -> b - 1

-- Parsing commands