Heat ¼ inch of water in a large pot over medium heat. Cook cayenne, cumin, and turmeric, stirring, until fragrant (about 1 minute). Add onion, garlic, and ginger and cook until softened, about 5 mins.
Add apple and lentils, stirring to coat. Stir in the coconut milk and 2½ cups water and bring to a boil.
Reduce heat and simmer, stirring occasionally, until lentils are completely soft and dal is thick, about 25 mins.
Add lime juice and season with salt and pepper.
Divide dal into bowls and top with fresh cilantro, toasted coconut flakes, and an extra squeeze of lime, if desired.
Recipe by Daily Dose of Greens at https://dailydoseofgreens.com/2018/11/06/coconut-apple-ginger-dal/