Or maybe not an iterator but a delimited continuation? Probably the following behavior is more natural: ~~~ruby def f ['a', 'b', 'c'].each do |c| puts yield c end return 'd' end c, v = f puts v # : a c, v = c....alexeymuranov (Alexey Muranov)
Trying to figure out how `yield` works in Python, i had the following idea. Allow a method with `yield` to be called without a block. When a method encounters `yield`, if no block is given, the method returns an `Enumerator` object. ...alexeymuranov (Alexey Muranov)
I have just stumbled upon this: the [Immutable collections for JavaScript](http://facebook.github.io/immutable-js/) has both `Map` and [`OrderedMap`](http://facebook.github.io/immutable-js/docs/#/OrderedMap). One more: in Haskell, the...alexeymuranov (Alexey Muranov)
I forgot to mention other usual cases when lines should be implicitly continued: after a dot, after an operator symbol, etc.alexeymuranov (Alexey Muranov)
Since the seemingly reasonable proposal #8956 has been rejected because it "diverged so far from the original", i will dare to propose another version here. I suggest to automatically convert line breaks inside parentheses `(...)`, in...alexeymuranov (Alexey Muranov)
It has not been mentioned in this thread yet that in Python it is done like this: ```python empty_set = set() # => set([]) some_set = {1, 1, 2, 2, 3, 4} # => set([1, 2, 3, 4]) ``` Python [has no literal for the e...alexeymuranov (Alexey Muranov)
I meant that a function called like `Math::sin` would be required to return same values (for same arguments) every time. Maybe i did not explain this well. `Foo.bar`, on the other hand, would not have this restriction. Same could be...alexeymuranov (Alexey Muranov)
Besides functional programming, IMO this would support [command–query separation](https://en.wikipedia.org/wiki/Command–query_separation).alexeymuranov (Alexey Muranov)