Step 1 Place the beans, onion, carrot, bay leaf and garlic in a medium saucepan and add water until the beans are covered by about an inch. Bring to a boil, then partially cover and reduce the heat to low. Simmer until the beans are almost tender, about 2 hours, adding water as needed.
Step 2 Add the salt and continue cooking until tender. Drain the beans, discarding the onion, carrot, garlic and bay leaf.
Step 3In a large bowl, combine the beans, corn kernels, red pepper, green onions and cilantro. Stir in the olive oil, lime juice and cayenne pepper, and adjust seasoning. Serve warm or room temperature.