Skip to content

ListQ

Status: Stable

documented, exercised by the test suite and/or worked examples, with no known limitations recorded.

Description

ListQ[expr] gives True if expr is a list (head List), False otherwise.

Examples

No verified examples yet for this function.

Implementation notes

builtin_listq (src/list.c) returns True/False according to the is_listq helper, i.e. whether the argument is an EXPR_FUNCTION whose head is the symbol List.

Attributes: Protected.

Implementation status

Stable — documented, exercised by the test suite and/or worked examples, with no known limitations recorded.

References

Notes & additional examples

Worked examples

In[1]:= ListQ[{1, 2, 3}]
Out[1]= True

In[2]:= ListQ[5]
Out[2]= False

Notes

ListQ tests only whether the head is List; it does not inspect the elements.