blob: 3801eac7a803e5ac4b54fabf9723a8db1cfbb2e1 (
plain) (
tree)
|
|
--------------------------------------------------------------------------------
module App where
--------------------------------------------------------------------------------
import Keyboard (Keyboard(..))
import Transforms (Transform(..))
import Utils ((|>))
import qualified Utils
--------------------------------------------------------------------------------
transform :: Transform -> Keyboard -> Keyboard
transform HorizontalFlip (Keyboard xs) = xs |> fmap reverse |> Keyboard
transform VerticalFlip (Keyboard xs) = xs |> reverse |> Keyboard
transform (Shift n) (Keyboard xs) = xs |> fmap (Utils.rotate n) |> Keyboard
|