Created
August 6, 2017 03:54
-
-
Save kunigami/6262854be79e43d47135ca6df4f947f8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let invalidate rotationStep = match rotationStep with | |
| Reversing ({validCount; front; frontReversed; rear; rearReversed}) | |
-> Reversing ({ | |
validCount = validCount - 1; | |
front; | |
frontReversed; | |
rear; | |
rearReversed; | |
}) | |
| Appending ({validCount = 0; rear = lastElem :: restRear}) | |
-> Done restRear | |
| Appending ({validCount; front; rear}) -> | |
Appending ({validCount = validCount - 1; front; rear}) | |
| rotationStep -> rotationStep | |
;; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment