Last active
March 20, 2017 16:40
-
-
Save kunigami/5dc5973fe28067e778d74c3529620f4a 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 pop (queue: 'a queueStream): ('a queueStream) = match queue with | |
(leftSize, left, rightSize, right) -> | |
let forcedLeft = Lazy.force left in | |
match forcedLeft with | |
| Nil -> raise Empty_queue | |
| StreamCell (_, rest) -> check (leftSize - 1, rest, rightSize, right) | |
;; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment