sourcelibs/Clocked/demos/detect.xtl

1⍝!/usr/bin/env xetal 2⍝ The 1 0 1 detector on a bit stream: the state after reset and after 3⍝ each bit, and where it has just seen 1 0 1. Run with "just demo-lib Clocked detect". 4ᶜᵏ⁼u̲se< "Clocked" 5bits ← 1 0 1 0 1 1 0 1 0 0 1 6states ← 0 'ᶜᵏd̲etect ᶜᵏt̲race bits 7states 8ᶜᵏf̲ound? states