Skip to content

Instantly share code, notes, and snippets.

@kunigami
Created 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/ce82f3cdee629ab255953d2c2298c357 to your computer and use it in GitHub Desktop.
Save kunigami/ce82f3cdee629ab255953d2c2298c357 to your computer and use it in GitHub Desktop.
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