úÎ!+ô*:     Circular stacks of fixed size(c) Dominik Schrempf, 2020GPL-3.0-or-laterdominik.schrempf@gmail.comunstableportableNoneSX)GcircularcCircular stacks with fxed maximum size are just normal vectors with a pointer to the last element.Construction of s is done with  and subsequent  ˆes, or the provided type conversion functions so that the index and bounds are updated and checked consistently. The data constructor Y is exported only to enable creation of orphan instances such as Arbitrary (QuickCheck)..When denoting the efficiency of the functions m/ refers to the current size of the stack, and n to the maximum size.circularpA circular stack without an element but of a given maximum size. At this state, it is not very useful :). O(n).circularÔConvert a circular stack to a vector. The first element of the returned vector is the deepest (oldest) element of the stack, the last element of the returned vector is the current (newest) element of the stack./This is a relatively expensive operation. O(m).circularìConvert the last N elements of a circular stack to a vector. The first element of the returned vector is the deepest (oldest) element of the stack, the last element of the returned vector is the current (newest) element of the stack.,The size of the stack must be larger than N./This is a relatively expensive operation. O(N).circularÈConvert a vector to a circular stack. The first element of the vector is the deepest (oldest) element of the stack, the last element of the vector is the current (newest) element of the stack. O(n).The vector must be non-empty. circular6Get the last element without changing the stack. O(1). circular8Get the last element and remove it from the stack. O(1).The stack must be non-empty. circular#Push an element on the stack. O(n). circular#Push an element on the stack. O(1).oBe careful; the internal vector is mutated! The immutable circular stack may not be used after this operation. circularCheck if the stack is full.circularTCompute summary statistics of the elements on the stack using a custom commutative  function.circular-Compute the sum of the elements on the stack.circular.Compute the mean of the elements on the stack.circular1Compute the product of the elements on the stack.ŒFor reasons of efficiency, commutativity of the combining function is assumed. That is, the order of elements of the stack must not matter.circularWe have c /= FromJSON $ ToJSON cR, but the elements on the stack and their order are correctly saved and restored.  Safe*      !"#%circular-0.1.0-FJP8QibieiyDTnoLrqiuv8Data.Stack.CircularPaths_circularCStackstackindexcurSizeemptytoVector toVectorN fromVectorgetpoppush unsafePushisFullfoldl1'summeanproduct$fFromJSONCStack$fToJSONCStack $fShowCStack $fEqCStackbaseGHC.Basemappendversion getBinDir getLibDir getDynLibDir getDataDir getLibexecDir getSysconfDirgetDataFileName