Definition. Definitions, Datatypes, Induction, Functions › The expand function [isa-0022]

primrec expand :: ‹oots ⇒ oot list› where ‹expand (ONEs n r) = replicate n ONE @ expand r› | ‹expand (TWOs n r) = replicate n TWO @ expand r› | ‹expand Empty = []›