about summary refs log tree commit diff
path: root/scratch/brilliant/App.hs
diff options
context:
space:
mode:
Diffstat (limited to 'scratch/brilliant/App.hs')
-rw-r--r--scratch/brilliant/App.hs14
1 files changed, 14 insertions, 0 deletions
diff --git a/scratch/brilliant/App.hs b/scratch/brilliant/App.hs
new file mode 100644
index 000000000000..3801eac7a803
--- /dev/null
+++ b/scratch/brilliant/App.hs
@@ -0,0 +1,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