It's perfect! Thank you! 17.08.2020, 20:17, "John Benediktsson" :Hi Alex, I pushed a commit to master for ?change-at with two slight changes. 1) I kept the ( key assoc quot -- ) stack effect that ?change-at has. 2) I used ``at*`` so that it works with keys that have a value of ``f``. Your version
On Mon, Aug 17, 2020, at 03:46, Alexander Ilin wrote:
> Any chance of a follow-up on this topic?
Yes, I apologize; life is a bit overloady at the moment, but I'll do my
damnedest to get back to you this evening.
>
> 04.08.2020, 23:06, "Benjamin Pollack" :
>> I think that’d ideally be best
Hi Alex,
I pushed a commit to master for ?change-at with two slight changes.
1) I kept the ( key assoc quot -- ) stack effect that ?change-at has.
2) I used ``at*`` so that it works with keys that have a value of ``f``.
Your version uses ``of`` which is like ``at`` and doesn't distinguish
Ah, gotcha!
That could be cool. I’ll push a commit later for that!
> On Aug 17, 2020, at 9:22 AM, Jon Harper wrote:
>
> I think Alex wanted the conditional execution of the quot.
> if the key doesn't exist in the assoc, change-at provides f as value,
> but still stores the newvalue in the
I think Alex wanted the conditional execution of the quot.
if the key doesn't exist in the assoc, change-at provides f as value,
but still stores the newvalue in the assoc at the given key.
Jon
On Mon, Aug 17, 2020 at 6:18 PM John Benediktsson wrote:
>
>
https://docs.factorcode.org/content/word-change-at,assocs.html
> On Aug 17, 2020, at 8:31 AM, Alexander Ilin wrote:
>
> Hello!
>
> I came up with this code, because I could not quickly find an existing word
> for this.
> Did I miss it? If not, would it be a useful addition to the assocs
Hello!
I came up with this code, because I could not quickly find an existing word
for this.
Did I miss it? If not, would it be a useful addition to the assocs vocab?
! If key exists in the assoc, change its value with quot.
: ?change-value ( assoc key quot: ( value -- value' ) -- assoc' )
Any chance of a follow-up on this topic? 04.08.2020, 23:06, "Benjamin Pollack" :I think that’d ideally be best done by adding an extra alloy/modifying the existing auth alloy to support it. I’ll need to take a look later tonight or perhaps tomorrow, but I can give you some pointers, because I was