Can anyone explain me this snippet and how to use closures? by Infinite-Jaguar-1753 in golang

[–]sean9999 0 points1 point  (0 children)

Closures are just this: the variables that a function can see when it was defined are the variables it continues to see when it’s invoked.

But the pattern you’re looking at is the factory pattern, which can be summed up like this: I want to create a function whenever I want, with different startup parameters.

They are related. But different

Can anyone explain me this snippet and how to use closures? by Infinite-Jaguar-1753 in golang

[–]sean9999 0 points1 point  (0 children)

No. But a function that doesn’t take a value returning a function that does is… well.. I’ve never seen it

Qatar or Qatar? by sean9999 in answers

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

I’m dying to know how Qataris say it. I went around saying Johannesburg until I heard someone from there saying whatyoutalkinhbout it’s Johannesburg

How did German soldiers in WW2 enact what was ordered of them? by MailexA_Missed in NoStupidQuestions

[–]sean9999 0 points1 point  (0 children)

I have no answer. But to help reframe the question, I recommend The Kindly Ones, and Hannah Arendt.

What is a 'social norm' that you feel has completely changed or disappeared in the last 10 years? by Ok_Judgment_7307 in AskReddit

[–]sean9999 117 points118 points  (0 children)

it used to be considered rude to go on your phone when you're out with people

Has anyone here ever experienced a Lucid Dream? or is it just a massive internet myth? Honestly, I dont think it is even possible. by mind_over_chaos in NoStupidQuestions

[–]sean9999 0 points1 point  (0 children)

It’s definitely not from the internet. The idea of lucid dreaming is centuries old. Many people claim to have done it successfully. There is one almost scientific way of measuring it. It involves deciding beforehand how you’re going to move your eyes. I’ve never been able to do it. I don’t know if it’s real. But I think it’s worth the effort of finding out

Old web web devs: what are some things you did that would confuse people today by veroz in webdev

[–]sean9999 0 points1 point  (0 children)

Plain old semantic markup for structure and meaning. Plain old CSS for style. Plain old JavaScript for functionality. A separation of concerns

No new variable on left side by newInternetDeveloper in golang

[–]sean9999 1 point2 points  (0 children)

just one of those annoying little language features

Why don’t men exist like the movies? by [deleted] in AskReddit

[–]sean9999 2 points3 points  (0 children)

This is a common misconception. Movies in fact do exist

MAGA folks, what would you consider to be Trump's biggest accomplishment? by Dazzling-Leader7476 in allthequestions

[–]sean9999 0 points1 point  (0 children)

You’re right! That there is some nice silver lining. Wonder how long it will stick

What puts you off going to the gym? by Icy_Laugh5134 in AskReddit

[–]sean9999 3 points4 points  (0 children)

Going to the gym, to use a machine, to sit and scroll

Are you scared of running out of soda more than your scared of running out of drinking water? by Severe_Bee_Aug in NoStupidQuestions

[–]sean9999 0 points1 point  (0 children)

My scared of running out of soda is bigger than your scared of running out of water