Recursion...https://play.golang.org/p/vZpUalvGq3f

https://play.golang.org/p/vZpUalvGq3f

What does “n := factorial(4)” mean, specifically, (4)

It’s just a function call. you pass 4 as argument to factorial function.

1 Like

See the tour about functions.

1 Like

This was helpful, One time I get lost is whenever the tour compares Go to C, because I know nothing about C. What I am beginning to do is skip over all the information about what C does and get back to what Go does

f func(func(int,int) int, int) int

Things like this ALMOST totally lose me

But i am determined

I realize this is necessary for most people studying Go so I’m not complaining, just noting

Thanks for directing me

Does the 4 here: n := factorial(4)
refer to the 4 in (4 * 3 * 2 * 1)?

Or is it a sepaate 4?

*separate

How about reading https://en.wikipedia.org/wiki/Factorial?

BTW, you can edit your post by clicking the ... button and then the pencil.

So is when the word factorial is invoked, does it result in an operation? Or is it an arbitrary identifier?

BTW, you can edit your post by clicking the ... button and then the pencil . Thanks!

[https://en.wikipedia.org/wiki/Factorial ] I looked this over and will do so again. My time is limited right now.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.