Compact promise pattern implementation