LinkedList.single

Checks if there is exactly one entry in the list.

Arguments

None

Return values

condition
is TRUE is there is exactly one entry, FALSE otherwise.

Complexity

Constant

Example

"sl/linkedList" useFile a: (1 2 0 5 "Hello" 0.3) makeList; b: List; c: (3.14) makeList; a.single print LF print b.single print LF print c.single print
Output:
FALSE FALSE TRUE