DEV Community


Discussion on: Function Composition Explained Using Pokémon Evolution

essheck profile image

I'm new to Dev world as well, And your example was explained really well, But I didn't understand why the Evolution function needs a second argument in it's definition.. As we are prompting the user to input the second argument.

cat profile image
Cat Author

I was under the thought that I needed a “holder” for the prompt so we can pass that through the individual Pokémon function to get their evolution result.

Also, I wanted to help my friend meet assignment requirements, which asked for 2 arguments.

But, I should definitely try it out without the second parameter.