Here's a slightly different decoration:

Code:
// find first marker stamp
marker := nextmarker(initial_stamp)

// make sure there's no missing marker between the onset and the first marker
if (marker - initial_stamp) > FifteenMinutes then
  error
endif

// test starting at first marker
test(marker, marker DIV FifteenMinutes)

// recursively test for each marker by counting units of FifteenMinutes
// stops either with error or EndOfList
function test(marker, expected_quotient)
  assert(marker MOD FifteenMinutes == 0)
  if (marker DIV FifteenMinutes) != expected_quotient then
    error
  endif
  test(nextmarker(marker, expected_quotient + 1))
endfunc


Again: an iterative version:

Code:
function test(marker, expected_quotient)
  while (marker DIV FifteenMinutes) == expected_quotient do
    marker := nextmarker(marker)
    expected_quotient++
  done
  error
endfunc



Edited by wfaulk (10/08/2010 16:07)
Edit Reason: iterative procedure
_________________________
Bitt Faulk