Skip to content

Instantly share code, notes, and snippets.

@kunigami
Last active March 20, 2017 16:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kunigami/5dc5973fe28067e778d74c3529620f4a to your computer and use it in GitHub Desktop.
Save kunigami/5dc5973fe28067e778d74c3529620f4a to your computer and use it in GitHub Desktop.
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