Swaps the current node with the previous node on the same level
Example:
Before:
p
|- a
|- b <--After:
p
|- b <--
|- a:: a typeCtrl KGHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27
Modulecursor-0.3.2.0Haskell2010
Swaps the current node with the previous node on the same level
Example:
Before:
p
|- a
|- b <--After:
p
|- b <--
|- aSwaps the current node with the next node on the same level
Example:
Before:
p
|- a <--
|- bAfter:
p
|- b
|- a <--Functor SwapResultDefined in cursor-0.3.2.0 · Cursor.Tree.SwapEq a => Eq (SwapResult a)Defined in cursor-0.3.2.0 · Cursor.Tree.SwapShow a => Show (SwapResult a)Defined in cursor-0.3.2.0 · Cursor.Tree.SwapGeneric (SwapResult a)Defined in cursor-0.3.2.0 · Cursor.Tree.SwapNFData a => NFData (SwapResult a)Defined in cursor-0.3.2.0 · Cursor.Tree.SwapValidity a => Validity (SwapResult a)Defined in cursor-0.3.2.0 · Cursor.Tree.Swaptype Rep (SwapResult a) = D1 ('MetaData "SwapResult"
"Cursor.Tree.Swap"
"cursor-0.3.2.0-F9X8WOAtgDl2Ee7ztttX2k"
'False) (C1 ('MetaCons "SwapperIsTopNode"
'PrefixI 'False) U1 :+: (C1 ('MetaCons "NoSiblingsToSwapWith"
'PrefixI 'False) U1 :+: C1 ('MetaCons "Swapped"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a))))Defined in cursor-0.3.2.0 · Cursor.Tree.Swap