Back to feeds

Question: What is the output of the following Kotlin code snippet? fun main() { val list = mutableListOf(1, 2, 3, 4, 5) val result = list.fold(5) { acc, num -> acc * num } println(result) }

Havish Gupta

Stealth • 8m

It should be 625, an educated guess. I used the same technique to guess this answer that i used in my exams 🔥

0 replies2 likes

More like this

Recommendations from Medial

Image Description
Image Description

Abhijit Jha

Stealth • 8m

What do you think WW3 is near? (Should I prepare for my exams?)

10 replies12 likes
Image Description
Image Description

Om Raut

Stealth • 7m

🔥🔥Hey Guys !!! 📌Just saw a sign on a building So I guess I'm already hired ??

7 replies29 likes
1
Anonymous
Image Description
Image Description

I got bad marks in all entrance exams now Should I take a drop year or should I just join a random college

15 replies7 likes
Image Description
Image Description

ratan

Stealth • 6m

I have a high liking for this platform and often wonder the reason behind this. And I guess I have an answer, that is:- FAMILIARITY I love this platform and the sole reason being, the environment shared by like minded people, who value ideas, prob

See More
3 replies4 likes
Image Description
Image Description

Rajan Paswan

Stealth • 6m

What key role should a founder hire in the initial stages of a startup? Answer: Pick any sector or domain of your choice and provide an answer relevant to that.

7 replies6 likes
Image Description
Image Description

Avaneesh Sharma

Stealth • 13d

Today I have an interview but I was not able to gave an single Answer to the interviewer... Disgusting

6 replies3 likes
1
Anonymous
Image Description

Guys there is an Indian company called Muscle Nectar. I have used their whey protein and it's the best I ever used. It's comparable to international brands. They are a small company but their products are top notch. We should support such companies f

See More
1 replies5 likes
Anonymous

I want an ethics and to check answer writing teacher for my institute #upsc

0 replies3 likes
Image Description

lince P

Stealth • 3m

I have an idea. an online written mock exam for school students and engineering and medical students. We work like real exam conductors. we evaluate written exams. Daily we conduct exams. how's it? I hope it will be very helpful to students. if you l

See More
1 replies4 likes
Anonymous

I think medial should have a ai , which could answer everything in terms of business, some general legal questions, give us case studies, suggest resources etc. not like every other ai, it should be like business ai , which is very smart and knows s

See More
0 replies1 like

Download the medial app to read full posts, comements and news.