Previous Up Next

12.2.8  Checking for a cycle

The is_cycle command is a boolean function which checks to see if a list represents a cycle.

Examples

is_cycle([2,1,3])
     
1           
is_cycle([2,1,3,2])
     
0           

Previous Up Next