singleton -package:base
O(1) Convert a character into a Text. Performs replacement on
invalid scalar values.
O(1). A
Builder taking a single character, satisfying
A map of one element.
singleton 1 'a' == fromList [(1, 'a')]
size (singleton 1 'a') == 1
A map with a single element.
singleton 1 'a' == fromList [(1, 'a')]
size (singleton 1 'a') == 1
Construct a map with a single element.
Construct a map with a single element.
Construct a set with a single element.
>>> HashSet.singleton 1
fromList [1]
O(1). Generate a singleton
Deque
>>> singleton 1
BD 1 [1] 0 []
O(1). A Builder taking a single byte, satisfying
Construct a range which represents a constant single value.
>>> bounds x $ singleton 5
(5,5)
>>> origin $ singleton 5
5
A map of one element.
singleton 1 'a' == fromList [(1, 'a')]
size (singleton 1 'a') == 1
Create a byte array from a single byte
singleton x is a
DList with the single element
x.
singleton obeys the law:
toList (singleton x) = [x]
singleton x is a
DNonEmpty with the single
element
x.
singleton obeys the law:
toNonEmpty (singleton x) = x :| []