Definition of the algarroba bean are long pod containing small beans and sweetish edible pulp; used as animal feed and source of a chocolate substitute .