Hanmac (Hans Mackowiak) wrote in #note-4: > i had a similar problem when i wanted to make Symbol to_proc use parameters, i would have done something like `:to_s.(16)` Thanks, the implementation of format proc could be anything other tha...RichOrElse (Ritchie Buitre)
I like the idea. I made a [similar proposal](https://bugs.ruby-lang.org/issues/15302), but admittedly it wasn't as intuitive as I have hoped. So with my [new proposal](https://bugs.ruby-lang.org/issues/17663), the code looks like this. ...RichOrElse (Ritchie Buitre)
**Enumerator#with** yields each element along with the arguments ``` ruby class Enumerator def with(*options) return to_enum(:with, *options) unless defined? yield each do |entry| yield entry, *options end ...RichOrElse (Ritchie Buitre)
matz (Yukihiro Matsumoto) wrote: > I wonder those words do not cause confusion which works which way? At least I was confused. I agree with your assessment Matz. Both 'with' and 'by' are such flexible words, they're the first words t...RichOrElse (Ritchie Buitre)
* [Feature #15302] Proc#with and Proc#by, for partial function application and currying (Ritchie Buitre) * Convenient methods for functional programming.RichOrElse (Ritchie Buitre)
shevegen (Robert A. Heiler) wrote: > I am not sure if the API seems ok. I am also not sure if matz > ... Thank you for taking the time to review my proposal and for the suggestions. To illustrate more clearly how **`Symbol#with`** wor...RichOrElse (Ritchie Buitre)
**Proc#by** allows currying implicitly ~~~ ruby class Proc def by(*head) return self if head.none? curry(head.size.next).(*head) end end class Method def by(*head) to_proc.by(*head) end end class Sym...RichOrElse (Ritchie Buitre)
I suggest aliasing `#yield_self` with **#to_be**. The `to_` prefix suggest returning a value while [the word "be"](https://gist.github.com/RichOrElse/452e5f9f35f16c3fb6ef6d3ab41a173c) connotes both identity (`#itself`) and it's new condi...RichOrElse (Ritchie Buitre)
matz (Yukihiro Matsumoto) wrote: > I want to make sure if everyone agrees with "*" instead of OP's "<<". > ... +1 for #* Initially I thought of the F# convention #<< and it's counter part #>> as intuitive. But after giving it some t...RichOrElse (Ritchie Buitre)