Skip to main content

New answers tagged

1 vote

Splicing a list of arguments into a function with Sequence

Using FlattenAt With atomic elements array = {e, f}; FlattenAt[-1] @ f[a, b, c, d, array] f[a, b, c, d, e, f] With non-...
eldo's user avatar
  • 74.5k
5 votes

Why doesn't b = a; f[a_] := b; f[2] return 2?

I thinks it is pretty obvious why the first code returns a and the second 2. You can see it by comparing ...
azerbajdzan's user avatar
  • 18.8k
4 votes

Why doesn't b = a; f[a_] := b; f[2] return 2?

To understand what is going on you need to look at "DownValues" to see what is actually stored: ...
Daniel Huber's user avatar
  • 52.6k
10 votes
Accepted

Why doesn't b = a; f[a_] := b; f[2] return 2?

Caution The post is long. If you just want to know how to fix the code, please search "fix the code in title in 10 ways" in the page. If you want to read discussions about global/local ...
xzczd's user avatar
  • 66.8k

Top 50 recent answers are included