swap package:streamly-core
Convert an
Unfold that accepts a tuple as an argument into an
unfold that accepts a tuple with elements swapped.
swap = Unfold.lmap Tuple.swap
Pre-release
Swap the elements at two indices.
Pre-release
Swap the byte order of Word16
swapByteOrder 0xABCD == 0xCDAB
swapByteOrder . swapByteOrder == id
Swap the elements at two indices without validating the indices.
Unsafe: This could result in memory corruption if indices are
not valid.
Pre-release