Implement heap in coffee