Skip to main content

New answers tagged

2 votes

How to fix parameter locally for iterating recursion equations

Probably this: ...
mattiav27's user avatar
  • 6,747
2 votes

How to fix parameter locally for iterating recursion equations

One (less desirable) fix is to use Block rather than With: ...
lericr's user avatar
  • 29.2k
1 vote

How can I implement dependence between locally defined variables in With?

L = RandomInteger[10, {10}] M = With[{i = RandomInteger[{1, 10}]}, With[{j = #[[i]]}, If[i < j, ReplacePart[#, i -> #[[j]]], #]]] & M[L]
azerbajdzan's user avatar
  • 18.9k
0 votes

How to Block built-in functions conditionally in a single Block statement?

Here are few alternatives, using what I think I've seen called an injector pattern (which I just found in this answer by @Mr.Wizard and might be considered a duplicate): ...
Goofy's user avatar
  • 3,072
1 vote

How to Block built-in functions conditionally in a single Block statement?

While I understand that you think you're asking about just a "tiny technical piece", the semantic framing of a problem is EVERYTHING. Since you've already discovered one way to do this "...
lericr's user avatar
  • 29.2k

Top 50 recent answers are included