repetit.icn: Procedure to find smallest repetition pattern in list

link repetit
February 25, 2003; Ralph E. Griswold
This file is in the public domain.

This procedure returns the length of the smallest range of values
that repeat in a list.  For example, if

     L := [1, 2, 3, 1, 2, 3, 1, 2, 3]

repetit(L) returns 3.  If there is no repetition, repetit() returns
the length of the list.

Source code | Program Library Page | Icon Home Page