Beans, lentils, and peas are members of the same family as legumes, which contain edible seeds encased in pods. While tree nuts, such as walnuts, almonds, cashews, and pecans, are all produced on trees.