# Linked Questions

23 questions linked to/from Using a list of tuples in a pure function
4 votes
1 answer
250 views

### Association of pure functions [duplicate]

I've encountered confusing behavior of Association when I try to use it for storing pure functions. For example: as = <|"1" -> # + 1 &|> ...
• 2,006
76 votes
3 answers
6k views

### when is f@g not the same as f[g]?

I have always thought that f@g will give the same result as f[g] in all cases, and it is just a matter of style which one to use ...
• 144k
30 votes
3 answers
1k views

### Parentheses in pure functions: # & vs. ( # &)

I've been using Mathematica for years, and over time I have developed the habit of using: Select[data, (# == 1 &)] instead of ...
• 4,426
37 votes
3 answers
3k views

### How to Combine Pattern Constraints and Default Values for Function Arguments?

EDIT: As several respondents have noted in the answers and comments below, the original example had a default value that would never be used because of the way patterns and default values are ...
• 1,511
24 votes
3 answers
1k views

### How can I get the unchanged Box form of an arbitrary expression?

One may observe that MakeBoxes does not give the actual Box form of various expressions: MakeBoxes[{1*^4, 000123, a*b c}] <...
• 272k
15 votes
2 answers
605 views

### Infix form of PutAppend ( >>> ) does not work with variable

I'm new to Mathematica, so I suspect this question involves either a misunderstanding involving variables or the usage of >>>. On a webMathematica page (...
• 825
18 votes
1 answer
1k views

### Is there a guideline about when to end expressions with semicolons?

Whether for nested Ifs or within scoping constructs like Module and Block, I never know ...
• 3,666
9 votes
3 answers
202 views

### Metaquestion: how to find out why (e.g.) MatchQ[42, _?Function[x, True]] is False?

Suppose you run into a bewildering Mathematica result (which happens to me several times per Mathematica session, even after a 20-year acquaintance), such as, for example: ...
• 11.7k
17 votes
3 answers
580 views

### What is the real default CellEvaluationFunction?

The default CellEvaluationFunction is Identity but one can quickly see that this is handled specially as an equivalent function, ...
• 272k
3 votes
4 answers
1k views

### Extracting RHS from Rule

In an example from another question, the rhs of a list of rules can be simply extracted: ...
• 341
1 vote
2 answers
205 views

### Confused about scoping, not sure what to ask

I'm grading for a class using Mathematica right now, and one of the students ran into a weird issue. When he ran code like this: ...
• 13
5 votes
2 answers
274 views

### Associativity of /@ [duplicate]

Why are the following not equivalent: Map[Line, Map[(Print[#]; #) &, {{{2, 1}, {1, 1}}, {{-2, 1}, {3, 1}}}]] which produces ...
• 437
2 votes
2 answers
347 views

### FullForm applied to functions

I would have expected FullForm[Cases[{a^2, a^3}, a_^1]] to produce Cases[List[Power[a, 2], Power[a ,3]], Pattern[a, Blank[]]]...
• 61.5k
0 votes
1 answer
769 views

### how to work with list as function parameter

I want to output an arrow based on input from user and I tried writing this small function to achieve this: ...
• 2,073
4 votes
1 answer
531 views

### How to see abstract syntax tree of Wolfram Language expression

I mean, suppose I have this expression: 2 + 2 I want to get something like this: Plus[2, 2] as an output. I've tried FullForm, but this just evaluates 2+2 and returns 4. Is this even possible?
• 43

15 30 50 per page