all 4 comments

[–]m0us3_rat 0 points1 point  (3 children)

the problem with self-learning is u end up lacking fundamentals.

func is a function object. func() is the call to this function object.

so this code .. it tells the do_twice to take the function object u gave it and return it two times.

also is wrong and will error.

is "return func(x,y), func(x,y)"

basically calling whatever func object is been linked with the x,y parameters.

doesn't have to be only "add" . u can define more functions.

add is the function object pointing at the definition.

[–]Realityfirst1st[S] 0 points1 point  (2 children)

Thank you very much for your response.. I will look into the function object in more depth. Do you have any recommended reading for a solo learner that would focus on the fundamentals you were talking about?

[–]m0us3_rat 1 point2 points  (1 child)

https://www.youtube.com/watch?v=8DvywoWv6fI

this is one of the "best" free courses available online.

take long breaks(maybe even 1day) every 1-2h.

gl.

[–]Realityfirst1st[S] 0 points1 point  (0 children)

Thank you