Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
Ruby
Why no Proc##[]=() ? Why no Proc##replace() ?
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Zsban Ambrus, post: 4429547"] You don't. A proc is just a simple lambda without mutable internal state. If you want a proc-like object that can have mutable internal state, define a class and define its [] method. That's simpler. Ok, it is possible with lambdas too, but I'm not sure how exactly. [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Ruby
Why no Proc##[]=() ? Why no Proc##replace() ?
Top