DataStructureQ

DataStructureQ[ds]

yields True if ds is a valid data structure and False otherwise.

DataStructureQ[ds,type]

yields True if ds is a valid data structure of the specified type and False otherwise.

Examples

Basic Examples  (1)

Create an instance of a stack:

Test that this is a valid data structure:

Test that this is a valid stack:

Test that this is not a linked list:

Introduced in 2020
 (12.1)