h&6L]      Safe-Inferred,"%&()*/125689:;<  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~-  Safe-Inferred,"%&()*/125689:;< SaccNon-empty accumulator. Relates to  the same way as  to list.  Safe-Inferred,"%&()*/125689:;<  Safe-Inferred,"%&()*/125689:;<G accData structure intended for accumulating a sequence of elements for later traversal or folding. Useful for implementing all kinds of builders on top.#Appending and prepending is always \mathcal{O}(1).Another way to think about this data-structure is as of a strict list with fast append and snoc.To produce a single element  use . To produce a multielement  use .. To combine use   or  and other   and )-related utils. To extract elements use  API.The benchmarks show that for the described use-case this data-structure is on average 2 times faster than  and , is on par with list when you always prepend elements and is exponentially faster than list when you append.Internally it is implemented as a simple binary tree with all functions optimized to use tail recursion, ensuring that you don't get stack overflow.accPrepend an element.accExtract the first element.The produced accumulator will lack the extracted element and will have the underlying tree rebalanced towards the beginning. This means that calling  on it will be \mathcal{O}(1).accAppend an element.accExtract the last element.The produced accumulator will lack the extracted element and will have the underlying tree rebalanced towards the end. This means that calling  on it will be \mathcal{O}(1) and  will be \mathcal{O}(n).acc,Convert to non empty list if it's not empty.acc+Convert to non empty acc if it's not empty.acc Enumerate in range, inclusively. acc%Construct from list in reverse order.This is more efficient than . , which is actually defined as fromReverseList .  .          !"#$#%&'()*+*,-. /01234 /56789 !:;<;=>?7@7A7B7C7DEFGHGIJKLKMKNKOKPKQKRKKSKTKUKV WX WY WZ[\[][^[_[`[a[b[c[d[e[f[g[h[i[j[k[l[m[n[o[p[q[r;s;t;u;v;w;x;y;z;{;|;};~ W W W W W W W W;;[[[[[[[[[[[[[[[;;;;;;           ;; !&   GG 7>>>>>>>>>>>>>>3333333333333((((((((((((EEEEEEE11111111111111111111111111111111111111111111111111111111111111111111111&&&&GGG[[[                                                      ; ; ; ; ; ; ; ; ; ;               # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #                  * * *                                                    W W W                     "acc-0.2.0.3-CJQ54wVy0RH5nUNq6A9L0r Acc.NeAccAcc Acc.Prelude Acc.NeAcc.Def Data.DListDList Data.SequenceSeqNeAccconsunconssnocunsnoc toNonEmptytoNeAcc enumFromTofromReverseList $fShowAcc $fIsListAcc $fMonoidAcc$fSemigroupAcc$fAlternativeAcc$fApplicativeAcc$fTraversableAcc $fFoldableAcc $fNFData1Acc $fNFDataAcc $fFunctorAccbaseGHC.Base++ghc-primGHC.PrimseqGHC.Listfilterzip GHC.Stable newStablePtr System.IOprint Data.Tuplefstsnd otherwiseassert GHC.MagiclazyGHC.IO.Exception assertError Debug.TracetraceinlinemapGHC.Exts groupWith$coerceGHC.Real fromIntegral realToFrac Control.MonadguardIsListtoList fromListNItemfromList Data.DynamictoDyn Unsafe.CoerceunsafeEqualityProof unsafeCoerce#joinGHC.EnumBoundedmaxBoundminBoundEnumsuccpredenumFromThenTo enumFromThenenumFromfromEnumtoEnum GHC.ClassesEq==/= GHC.FloatFloatingtanhtansqrtsinhsinpilogBaselog1pexplog1plog1mexplogexpm1expcoshcosatanhatanasinhasinacosh**acos Fractionalrecip fromRational/IntegralremquotRemquotmoddivMod toIntegerdivMonad>>=return>> Data.DataDatatoConstrgunfoldgmapTgmapQrgmapQlgmapQigmapQgmapMpgmapMogmapMgfoldl dataTypeOf dataCast1 dataCast2Functorfmap<$GHC.NumNumsignumabs*+negate fromInteger-Ord<<=>maxmincompare>=GHC.ReadReadreadPrec readListPrec readsPrecreadListReal toRational RealFloat significand scaleFloatisNegativeZeroisNaN isInfiniteisIEEEisDenormalized floatRange floatRadix floatDigitsexponent encodeFloatatan2 decodeFloatRealFractruncateroundproperFractionceilingfloorGHC.ShowShowshowListshow showsPrecGHC.IxIxindexinRange rangeSizerangeData.Typeable.InternalTypeableControl.Monad.FixMonadFixmfixControl.Monad.Fail MonadFailfail Data.StringIsString fromString ApplicativeliftA2<*pure*><*> Data.FoldableFoldablefoldr'foldMap'foldMapfoldsumproductnullminimummaximumfoldr1foldl1foldl'elemfoldlfoldrlengthData.Traversable TraversabletraversesequencemapM sequenceA GHC.GenericsGenericGeneric1 Semigroupstimes<>sconcatMonoidmemptymconcatmappend GHC.TypesBoolFalseTrueStringCharDoubleFloatIntGHC.IntInt8Int16Int32Int64 ghc-bignumGHC.Num.IntegerInteger GHC.MaybeMaybeNothingJustOrderingGTLTEQRatioRational RealWorld StablePtrIOWordGHC.WordWord8Word16Word32Word64GHC.PtrPtrFunPtr Data.EitherEitherRightLeftNonEmpty:| CoercibleUnsafeEquality UnsafeReflTyConGHC.ForeignPtr ForeignPtrGHC.IO.Handle.TypesHandleGHC.STSTData.Bifunctor BifunctorsecondbimapfirstData.Functor.ComposeCompose getCompose Data.ComplexComplex:+realPartpolarphasemkPolar magnitudeimagPart conjugatecis Data.FixedUniPicoNanoMilliMicro HasResolution resolutionFixedMkFixedE9E6E3E2E12E1E0DeciCenti showFixedmod'divMod'div' Data.VoidVoidvacuousabsurdData.Semigroup WrappedMonoid WrapMonoid unwrapMonoidMingetMinMaxgetMaxLastgetLastFirstgetFirstArgMinArgMaxArg mtimesDefaultdiffcycle1sortWithFixityInfixPrefixDataTypeDataRepNoRepCharRepAlgRepIntRepFloatRep ConstrRep IntConstr FloatConstr AlgConstr CharConstrConstrConIndex tyconUQname tyconModule showConstr repConstr readConstr mkRealConstr mkNoRepTypemkIntegralConstr mkIntType mkFloatType mkDataType mkConstrTagmkConstr mkCharType mkCharConstrmaxConstrIndex isNorepType isAlgType indexConstr fromConstrM fromConstrB fromConstr dataTypeRep dataTypeNamedataTypeConstrs constrType constrRep constrIndex constrFixity constrFieldsSystem.TimeoutTimeouttimeoutControl.ConcurrentthreadWaitWriteSTMthreadWaitWritethreadWaitReadSTMthreadWaitReadrunInUnboundThreadrunInBoundThreadrtsSupportsBoundThreadsisCurrentThreadBoundforkOSWithUnmaskforkOS forkFinallyControl.Concurrent.ChanChanwriteList2Chan writeChanreadChannewChangetChanContentsdupChanControl.Concurrent.QSemQSemwaitQSem signalQSemnewQSemControl.Concurrent.QSemNQSemN waitQSemN signalQSemNnewQSemNControl.Monad.IO.ClassMonadIOliftIO Data.RatioapproxRational Data.STRef modifySTRef' modifySTRef Data.UniqueUnique newUnique hashUniqueGHC.StableName StableNamemakeStableNamehashStableName eqStableNameSystem.Environment withProgNamewithArgsunsetEnvsetEnv lookupEnv getProgNamegetEnvironmentgetEnvgetArgs!System.Environment.ExecutablePathgetExecutablePath System.ExitexitWith exitSuccess exitFailuredie System.MemperformMinorGCperformMajorGC performGC Text.PrintfprintfhPrintf zipWithM_zipWithMunless replicateM_ replicateMmfilter mapAndUnzipMforeverfoldM_foldMfilterM>=><=<<$!> Data.Version showVersion parseVersion traceStack traceShowM traceShowId traceShow traceMarkerIO traceMarkertraceMtraceIdtraceIO traceEventIO traceEvent putTraceMsg flushEventLog mapAccumR mapAccumLforMforfoldMapDefault fmapDefaultControl.ApplicativeZipList getZipList WrappedMonad WrapMonad unwrapMonad WrappedArrow WrapArrow unwrapArrowoptional Control.ArrowKleisli runKleisli ArrowZero zeroArrow ArrowPlus<+> ArrowMonad ArrowLooploop ArrowChoicerightleft|||+++ ArrowApplyappArrow&&&***arrreturnAleftApp^>>^<<>>^<<^ writeFilereadLnreadIOreadFileputStrLnputStrputCharinteractgetLine getContentsgetChar appendFile GHC.IO.HandlehClose GHC.Conc.IO threadDelay registerDelayioManagerCapabilitiesChangedensureIOManagerIsRunning closeFdWithGHC.Conc.SignalSignal HandlerFun setHandler runHandlersControl.Concurrent.MVarwithMVarMaskedwithMVarswapMVar modifyMVar_modifyMVarMasked_modifyMVarMasked modifyMVar mkWeakMVaraddMVarFinalizerSystem.IO.Unsafe unsafeFixIOControl.ExceptionHandlercatchesallowInterruptControl.Monad.ST.ImpfixSTSystem.IO.Error userErrorType tryIOErrorresourceVanishedErrorTypepermissionErrorType modifyIOError mkIOErrorisUserErrorType isUserErrorisResourceVanishedErrorTypeisResourceVanishedErrorisPermissionErrorTypeisPermissionErrorisIllegalOperationErrorTypeisIllegalOperationisFullErrorType isFullErrorisEOFErrorType isEOFErrorisDoesNotExistErrorTypeisDoesNotExistErrorisAlreadyInUseErrorTypeisAlreadyInUseErrorisAlreadyExistsErrorTypeisAlreadyExistsErrorioeSetLocation ioeSetHandleioeSetFileNameioeSetErrorTypeioeSetErrorStringioeGetLocation ioeGetHandleioeGetFileNameioeGetErrorTypeioeGetErrorStringillegalOperationErrorType fullErrorType eofErrorTypedoesNotExistErrorType catchIOErrorannotateIOErroralreadyInUseErrorTypealreadyExistsErrorTypeControl.Exception.Base TypeError RecUpdError RecSelError RecConErrorPatternMatchFailNonTermination NoMethodErrorNestedAtomicallytryJusttry onException mapException handleJusthandlefinally catchJustbracket_bracketOnErrorbracket GHC.Conc.Sync ThreadStatus ThreadRunningThreadFinished ThreadBlocked ThreadDiedThreadIdTVarSTMPrimMVar BlockReason BlockedOnSTMBlockedOnOther BlockedOnMVarBlockedOnForeignCallBlockedOnBlackHoleBlockedOnExceptionyield writeTVar unsafeIOToSTMthrowTothrowSTM threadStatusthreadCapabilitysetUncaughtExceptionHandlersetNumCapabilitiessetAllocationCounter runSparksretryreportStackOverflowreportHeapOverflow reportError readTVarIOreadTVarpseqpar numSparksnumCapabilities newTVarIOnewTVarnewStablePtrPrimMVar myThreadIdmkWeakThreadId labelThread killThreadgetUncaughtExceptionHandlergetNumProcessorsgetNumCapabilitiesgetAllocationCounterforkOnWithUnmaskforkOnforkIOWithUnmaskforkIOenableAllocationLimitdisableAllocationLimit childHandlercatchSTM atomicallyDynamic fromDynamicfromDyn dynTypeRepdynApplydynAppSomeAsyncException IOErrorType UserErrorUnsupportedOperationUnsatisfiedConstraints TimeExpired SystemErrorResourceVanishedResourceExhausted ResourceBusy ProtocolErrorPermissionDenied OtherError NoSuchThingInvalidArgument InterruptedInappropriateTypeIllegalOperation HardwareFaultEOF AlreadyExistsFixIOExceptionExitCode ExitFailure ExitSuccessDeadlockCompactionFailedBlockedIndefinitelyOnSTMBlockedIndefinitelyOnMVarAsyncException UserInterrupt ThreadKilled HeapOverflow StackOverflowAssertionFailedArrayExceptionIndexOutOfBoundsUndefinedElementAllocationLimitExceededuntangle stackOverflow ioExceptionioError heapOverflowcannotCompactPinnedcannotCompactMutablecannotCompactFunctionblockedIndefinitelyOnSTMblockedIndefinitelyOnMVarasyncExceptionToExceptionasyncExceptionFromExceptionallocationLimitExceeded Data.IORef modifyIORef' modifyIORef mkWeakIORefatomicWriteIORefatomicModifyIORefForeign.ForeignPtr.ImpnewForeignPtrEnv newForeignPtrmallocForeignPtrArray0mallocForeignPtrArray FinalizerPtrFinalizerEnvPtrwithForeignPtrtouchForeignPtrplusForeignPtrnewForeignPtr_mallocForeignPtrBytesmallocForeignPtrfinalizeForeignPtrcastForeignPtraddForeignPtrFinalizerEnvaddForeignPtrFinalizer GHC.IORefIORef writeIORef readIORefnewIORefatomicModifyIORef'GHC.IO MaskingStateUnmaskedMaskedInterruptibleMaskedUninterruptibleFilePathuninterruptibleMask_uninterruptibleMaskthrowIOstToIOmask_mask interruptiblegetMaskingStateevaluatecatch IOExceptionioe_type ioe_location ioe_handle ioe_filename ioe_errnoIOErrorioe_description userErrorunsupportedOperation GHC.Exception ErrorCallErrorCallWithLocationthrowGHC.Exception.Type Exception toExceptiondisplayException fromExceptionArithExceptionRatioZeroDenominatorLossOfPrecision DivideByZeroDenormal UnderflowOverflow Data.TypeableTypeRep typeRepTyContypeRepFingerprint typeRepArgstypeReptypeOf7typeOf6typeOf5typeOf4typeOf3typeOf2typeOf1typeOf splitTyConApp showsTypeRep rnfTypeRepmkFunTygcast2gcast1gcast funResultTyeqTcast tyConPackage tyConName tyConModuletyConFingerprint trLiftedReprnfTyConData.Functor.ConstConstgetConst traverse_ sequence_ sequenceA_ornotElemmsum minimumBy maximumBymapM_for_forM_foldrMfoldlMfind concatMapconcatasumanyandall Data.OldListzipWith7zipWith6zipWith5zipWith4zip7zip6zip5zip4wordsunzip7unzip6unzip5unzip4unwordsunlinesunionByunionunfoldr transposetails subsequences stripPrefixsortBysort singleton permutations partitionnubBynublines isSuffixOf isPrefixOf isInfixOf intersperse intersectBy intersect intercalateinsertByinsertinitsgroupBygroup genericTakegenericSplitAtgenericReplicate genericLength genericIndex genericDrop findIndices findIndex elemIndices elemIndex dropWhileEnddeleteFirstsBydeleteBydelete\\ Data.MonoidApgetApData.Semigroup.InternalSumgetSumProduct getProductEndoappEndoDualgetDualAnygetAnygetAltAllgetAll stimesMonoidstimesIdempotentData.OrdDowngetDown comparingclamp Foreign.PtrWordPtrIntPtr wordPtrToPtr ptrToWordPtr ptrToIntPtr intPtrToPtrfreeHaskellFunPtrForeign.StorableStorable pokeElemOff pokeByteOffpoke peekElemOff peekByteOffpeeksizeOf alignment freeStablePtrdeRefStablePtrcastStablePtrToPtrcastPtrToStablePtrunsafeCoerceUnliftedunsafeCoerceAddr unsafeCoerce Data.BitsXorgetXorIorgetIorIffgetIffAndgetAndoneBits Data.Char isSeparatorisNumberisMarkisLetter digitToInt Text.Readreads readMaybe readEitherreadrightspartitionEithersleftsisRightisLeft fromRightfromLefteither Data.ProxyProxyKProxy asProxyTypeOfControl.CategoryCategoryid.>>><<<Data.Type.Equality:~~:HRefl:~:ReflplusPtrnullPtr nullFunPtrminusPtrcastPtrToFunPtrcastPtrcastFunPtrToPtr castFunPtralignPtrNumericshowOct showIntAtBaseshowIntshowHex showHFloat showGFloatAlt showGFloat showFFloatAlt showFFloat showEFloatshowBin readSignedreadOctreadIntreadHex readFloatreadDecreadBin readParen readLitChar lexLitChar lexDigitslexText.ParserCombinators.ReadPrecReadPrec readS_to_Prec readPrec_to_S readPrec_to_P readP_to_PrecText.ParserCombinators.ReadPReadS showFloatfromRat floatToDigits byteSwap64 byteSwap32 byteSwap16 bitReverse8 bitReverse64 bitReverse32 bitReverse16 GHC.UnicodeGeneralCategoryUppercaseLetterTitlecaseLetter SurrogateSpacingCombiningMarkSpace PrivateUseParagraphSeparator OtherSymbolOtherPunctuation OtherNumber OtherLetterOpenPunctuation NotAssignedNonSpacingMarkModifierSymbolModifierLetter MathSymbolLowercaseLetter LineSeparator LetterNumber InitialQuoteFormat FinalQuote EnclosingMark DecimalNumberDashPunctuationCurrencySymbolConnectorPunctuationControlClosePunctuationtoUppertoTitletoLowerisUpperisSymbolisSpace isPunctuationisPrint isOctDigitisLowerisLatin1 isHexDigitisDigit isControl isAsciiUpper isAsciiLowerisAscii isAlphaNumisAlphageneralCategoryGHC.Bits FiniteBits finiteBitSizecountLeadingZeroscountTrailingZerosBitszeroBitsxor unsafeShiftR unsafeShiftLtestBitshiftRshiftLshiftsetBitrotateRrotateLrotatepopCountisSigned complementBit complementclearBit bitSizeMaybebitSizebit.&..|.toIntegralSizedtestBitDefaultpopCountDefault bitDefault showSignedodd numeratorlcmgcdeven denominator^^^%GHC.Charchr GHC.STRefSTRef writeSTRef readSTRefnewSTRefrunSTShowSshows showString showParen showLitCharshowChar intToDigitzipWith3zipWithzip3unzip3unzip takeWhiletaketailsplitAtspanscanr1scanrscanl1scanl'scanlreverse replicaterepeatlookuplastiterate'iterateinitheadfoldl1' dropWhiledropcyclebreak!! Data.Maybe maybeToListmaybemapMaybe listToMaybe isNothingisJust fromMaybefromJust catMaybes Data.Boolbool Data.Functiononfix& Data.Functorvoid<&><$>$>uncurryswapcurryVersion versionTags versionBranch makeVersion GHC.IO.UnsafeunsafePerformIOunsafeInterleaveIOunsafeDupablePerformIOGHC.MVarMVar tryTakeMVar tryReadMVar tryPutMVartakeMVarreadMVarputMVarnewMVar newEmptyMVar isEmptyMVarsubtract MonadPlusmplusmzero Alternativesomemany<|>emptywhenuntilordliftM5liftM4liftM3liftM2liftMliftA3liftAflipconstasTypeOfap=<<<**>$!GHC.Err undefinederrorWithoutStackTraceerrorstimesIdempotentMonoid SomeException&&not||deepseq-1.4.6.1Control.DeepSeqNFData2liftRnf2NFData1liftRnfNFDatarnfrwhnfrnf2rnf1forcedeepseq<$!!>$!!3foldable1-classes-compat-0.1-AfWO0TFeTi3CTsspsKxEKPData.Foldable1foldlM1foldrM1 intercalate1 Foldable1fold1foldMap1,semigroupoids-6.0.0.1-4alTQXJXT9lBqDEMW5fn3PData.Semigroup.Traversable gsequence1 gtraverse1foldMap1Default Data.Semigroup.Traversable.Class Traversable1 traverse1 sequence1Data.Semigroup.Foldable gtoNonEmpty gfoldMap1gfold1asum1foldMapDefault1 sequenceA1_for1_ traverse1_intercalateMap1Data.Functor.AltgaltAltData.Functor.ApplygliftF3gliftF2liftF3<..>Data.Functor.Bind.Classtraverse1Maybe<*.><.*>ApplyliftF2<.<.>.>WrappedApplicativeWrapApplicativeunwrapApplicative MaybeApply runMaybeApplyLeafBranchprependReverseListunconsTounsnocToappendEnumFromTo