úÎ![ã     A cyclic doubly linked list. To create a new Cycle, use   ,  or any of  the insertion functions from  . Elements 2 are inserted in front of the current position. #To get the length of the list, use . & To extract all cycle elements, use  . You can % also create an infinite list with . The functions  and   fail with  for empty cycles. ,  and   fail with  for empty cycles if their I first argument is not 0. They also accept negative values for working  backwards (see   and   for details). In general, any function f working on  [a] can be adapted for Cycle a by writing fromList . f . toList. The , , , ,  and   instances work ) like the default instances for lists.  !?Move focus to the element on the left of the current position. "@Move focus to the element on the right of the current position.  goLeft . goRight == id Move abs n steps to the left (n < 0 ) or right (n > 0) or don't move  at all (n == 0). #'Get the value at the current position.  if null c. Get value on the left.  if null c. Get value on the right.  if null c. Get nth value to the left (n < 0 ) or right (n > 0) or  the current value (n == 0).  if null c.  nthValue = flip (!) $%&'()*+<Convert to an infinite list starting with the current value  and moving to the right. ,-./ Take abs n0 values starting at the current one and moving  to the right (n > 0 ) or left (n < 0). n can be arbitrary  big.  take n = fromList . takeLR n Drop abs n0 values starting at the current one and moving  to the right (n > 0 ) or left (n < 0). n can be arbitrary  big.  drop n = fromList . dropLR n ?Combine to cycles by applying a binary function to all element  pairs. Like Data.List.zipWith.   zipCycle = zipCycleWith (,)     0      !"#"$%&'()*+,-./0123456789:data-cycle-0.1.0 Data.CycleCyclegoLeftgoRightgoLRgetValue leftValue rightValuenthValuecycleToInfiniteListtakeLRdropLR zipCycleWithzipCyclecollections-api-1.0.0.0Data.CollectionsfromList fromFoldable UnfoldableData.Collections.FoldablesizetoListfrontbackbaseGHC.ErrerrortakedropsplitAtGHC.BaseMonadFunctorControl.Applicative Applicative Alternative Data.MonoidMonoidFoldableMkCycleDListMkDListdGoLeftdGoRight dGetValue nthValueLeft nthValueRight cycleLength cycleDList listCycle listDListdToList cycleToList dTakeRight dTakeLeft takeRighttakeLeft