about summary refs log tree commit diff
path: root/scratch/brilliant/App.hs
blob: dd3f2788a254d36ec2b9807dcbb9d2f1d72ef225 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
--------------------------------------------------------------------------------
module App where
--------------------------------------------------------------------------------
import Keyboard (Keyboard(..))
import Transforms (Transform(..))
import Utils ((|>))

import qualified Utils
--------------------------------------------------------------------------------

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