Created
March 20, 2017 16:40
-
-
Save kunigami/ce82f3cdee629ab255953d2c2298c357 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 check (queue: 'a queueStream): ('a queueStream) = match queue with | |
(leftSize, left, rightSize, right) -> | |
if rightSize <= leftSize then queue | |
else (leftSize + rightSize, Stream2.concat left (Stream2.reverse right), 0, Stream2.empty) | |
;; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment