declare fun {ListLength Lst} case Lst of _|Tail then 1 + {ListLength Tail} else 0 end end {Browse {ListLength 3|(4|5|6|nil)}} % ^ --------- % _|Tail