Add leaves() function with specs
Update README.md with leaves() signature