Apply a series of transformation to a QWERTY keyboard
TL;DR: - Accept input from the CLI - Add a project README.md
This commit is contained in:
parent
244503bba9
commit
d45685e245
4 changed files with 51 additions and 32 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue