about summary refs log blame commit diff
path: root/scratch/brilliant/App.hs
blob: 3801eac7a803e5ac4b54fabf9723a8db1cfbb2e1 (plain) (tree)
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 :: 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