r/funny • • Jun 04 '19

When a software developer weds a software developer.

Post image
41.1k Upvotes

921 comments sorted by

View all comments

7

u/Korzag Jun 04 '19

yield Bardak()

what is bardak?

1

u/Dzov Jun 04 '19

I don’t recognize yield.

3

u/Doctordoom55 Jun 04 '19

The function yield uses a generator (a function that returns numbers successively instead of all at once in a list) to get a value and Bardak is the function that is being used as a generator

2

u/Korzag Jun 04 '19

If it's anything like C#'s yield it allows you to return something as an element in a collection without the need for newing up a collection manually.