« first day (3123 days earlier)      last day (1371 days later) » 

2:24 PM
 
 
2 hours later…
5:19 PM
posted on August 06, 2020 by Arnoud Buzing

While catching up with my old friends Alice and Bob on Zoom a few days ago, I became intrigued by their recent card game hobby—and how they used the Wolfram Language to settle an argument. To figure out who gets to go first at the start of the game, they take one suit (spades) from [...]

 
@J.M.'stechnicaldifficulties yep
 
6:01 PM
Does anyone know how to assign an UpUpValue, so to speak?

For example, I'd like something like the following, but that works:

UpValues[g] = {HoldPattern[f_[h_[g[x]]]] :> HoldPattern[f[x] + h[x] + g[x]]}

Such that when I evaluate:

randoFunc[randoOtherFunc[g[x]]]

I get `randoFunc[x] + randoOtherFunc[x] + g[x]` .
This works using the standard TagSet approach for simple depth = 2, standard UpValues - e.g. with just f[g[x]]... but I'd like to overload the triple-decker case as well relative to (g).
 
6:35 PM
The simplest way - were (h) simply a single function - would be to assign an UpValue to (h), but I need this to work for any two "concentric" heads applied to (g), and TagSet and the other functions (as far as I know) don't allow such things.
 

« first day (3123 days earlier)      last day (1371 days later) »