úÎ)æ(1     ;A typeclass and an implementation for double-ended queues. portable provisionalhenry@elsie.org.uk An implementation of Banker')s Dequeues, as described in Chris Okasaki's < Purely Functional Data Structures. The functions for the  < instance have the following complexities (where n is the  of the  queue):   : O(1)  : O(1)  : O(1)  : O(n)  : O(n)   : O(1) amortised   : O(1) amortised   : O(1) amortised   : O(1) amortised   : O(n) %A typeclass for double-ended queues. Generates an empty queue. Returns  if this queue is empty. .Returns the number of elements in this queue. ,Returns the item on the front of the queue. *Returns the item on the end of the queue. 7Returns the first n items from the front of the queue. 4Returns the last n items from the end of the queue. ,Pushes an item onto the front of the queue. *Pops an item from the front of the queue. +Pushes an item onto the back of the queue. )Pops an item from the back of the queue. Converts a list into a queue. >Validates that if you push, then pop, the front of the queue,  you get the same queue. =Validates that if you push, then pop, the back of the queue,  you get the same queue. Validates that  returns the last  pushFront' d element. Validates that  returns the last  pushBack' d element. FValidates that the length of a queue is the same as the length of the " list generated from the queue. 1The maximum number of times longer one half of a  is * permitted to be relative to the other. CChecks to see if the queue is too far out of balance. If it is, it  rebalances it. 5Validates that if you push, then pop, the front of a  BankersQueue,  you get the same queue. 4Validates that if you push, then pop, the back of a ,  you get the same queue. Validates that  returns the last  pushFront' d element. Validates that  returns the last  pushBack' d element. Validates that the length of a  is the same as the length ) of the list generated from the queue. Validates that a # remains balanced despite repeated  pushes to the front. Validates that a # remains balanced despite repeated  pushes to the back. Validates that a # remains balanced despite repeated  pops from the front. Validates that a # remains balanced despite repeated  pops from the back.      !      !"#$ dequeue-0.1 Data.DequeueBankersDequeueDequeueemptynulllengthfirstlast takeFronttakeBack pushFrontpopFrontpushBackpopBackfromListprop_pushpop_frontprop_pushpop_backprop_push_frontprop_push_backprop_length_toListprop_pushpop_front_bqprop_pushpop_back_bqprop_push_front_bqprop_push_back_bqprop_length_toList_bqprop_push_front_bq_balanceprop_push_back_bq_balanceprop_pop_front_bq_balanceprop_pop_back_bq_balanceghc-primGHC.BoolTrue bqBalancecheckbalanced