Implementation of higher-order syntax using circular programming