2020-08-06 00:20:18 +02:00
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
module App where
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
import Keyboard (Keyboard(..))
|
|
|
|
import Transforms (Transform(..))
|
|
|
|
import Utils ((|>))
|
|
|
|
|
|
|
|
import qualified Utils
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
|
2020-08-06 00:30:25 +02:00
|
|
|
transform :: Keyboard -> Transform -> Keyboard
|
|
|
|
transform (Keyboard xs) HorizontalFlip = xs |> fmap reverse |> Keyboard
|
|
|
|
transform (Keyboard xs) VerticalFlip = xs |> reverse |> Keyboard
|
|
|
|
transform (Keyboard xs) (Shift n) = xs |> fmap (Utils.rotate n) |> Keyboard
|