diff options
author | William Carroll <wpcarro@gmail.com> | 2020-08-05T22·30+0100 |
---|---|---|
committer | William Carroll <wpcarro@gmail.com> | 2020-08-05T22·36+0100 |
commit | d45685e2459df4c73702a854309646ae1e146eec (patch) | |
tree | acc7935f2900c39ea1f3a59ebe4cd0b5d0bdf755 /scratch/brilliant/App.hs | |
parent | 244503bba91c9a99c9ab5a6a74b74d5c9bd9667e (diff) |
Apply a series of transformation to a QWERTY keyboard
TL;DR: - Accept input from the CLI - Add a project README.md
Diffstat (limited to 'scratch/brilliant/App.hs')
-rw-r--r-- | scratch/brilliant/App.hs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/scratch/brilliant/App.hs b/scratch/brilliant/App.hs index 3801eac7a803..dd3f2788a254 100644 --- a/scratch/brilliant/App.hs +++ b/scratch/brilliant/App.hs @@ -8,7 +8,7 @@ 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 +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 |