Linked Questions
11 questions linked to/from Is there a name for #1@#2&?
4
votes
2
answers
150
views
How to apply a function to an expression? [duplicate]
What is the name for the function #1[#2]&?
I would call it Apply, so that Apply[Sin,2] ...
2
votes
0
answers
53
views
Folow-up on combining pure functions [duplicate]
This is a follow-up to this question. Consider:
f = #^2&
g = #^3&
Compose[f, g]
(#1^3 &)^2
Am I the only one to think this is a bug?
77
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 ...
33
votes
4
answers
2k
views
What tools can help in realizing tail recursion?
I had nice discussions with Leonid and Rojo that got me interested in tail recursion. Tail recursion is not always easy to realize with Mathematica, so it would be nice to have some tools to help with ...
18
votes
4
answers
2k
views
Cleanest way to take a[b[c]] to a[b][c]
As indicated in the title I'm looking for the fastest way to transform a[b[c]] into a[b][c], and the natural generalization to ...
14
votes
5
answers
575
views
Apply multiple functions to parts of a nested list [duplicate]
data = {{1, a, x, "one"}, {2, b, y, "two"}, {3, c, z, "three"}}
I want to apply a list of four functions
{f, g, h, m}
one ...
6
votes
2
answers
580
views
Building conditional lists with Manipulate
I'm trying to select elements of a list that satisfy some criteria using Manipulate[].
Given 2 lists:
...
0
votes
2
answers
77
views
Sorting a list of pairs under a given function
If I have a list
p={{15/16,1/4},{3/4,13/64},{3/4,1/4},{3/16,1/64},{3/16,1/16},{0,1/64}}
I apply a function ...
1
vote
1
answer
193
views
Substitute complex functions into complicated polynomials
Mathematica has some strange way of sorting terms. It seems that it is using a canonical sort on expressions, e.g. $\mathbb{i} \sin[x] \cos[y] \cos[z]$ is returned as $\mathbb{i} \cos[y] \cos[z] \sin[...
1
vote
1
answer
140
views
Compute Mean and Variance for Random Choice
I have data
...
1
vote
0
answers
42
views
Is Construct introduced to replace Function application? Should it be treated as such an alternative?
I noticed that v.11.3 got released the other day; it was exciting so I went through the Summary of New Features in 11.3 to catch a glimpse of what's new and see if there is something I should keep in ...