Qurak

Substitute values of variables in functions that hold their arguments

Flusso di lavoro 5 passi, eseguiti in ordine in una sola sessione. Ogni passo è stato eseguito sul motore e l'output qui sotto è ciò che ha prodotto.

Passo 1
x = 2;
e = Hold[x + 1]
Output
Hold[x + 1]
Passo 2
x = 4;
ReleaseHold[e]
Output
5
Passo 3
x = 4;
ReleaseHold[e]
Output
5
Passo 4
x = 2;
Function[y, x + y]
Output
Function[y, x + y]
Passo 5
x = 2;
With[{x = x}, Function[y, x + y]]
Output
Function[y, 2 + y]

Funzioni usate

Ricette correlate

Tutte le ricette · Guida delle funzioni · Usa questo da un client MCP