Linked Questions

526
votes
19answers
130k views

Where can I find examples of good Mathematica programming practice?

I consider myself a pretty good Mathematica programmer, but I'm always looking out for ways to either improve my way of doing things in Mathematica, or to see if there's something nifty that I haven't ...
145
votes
3answers
10k views

How to make use of Associations?

I have been curious about it for long. Now that Mathematica 10 arrives, I think it's time to ask the question: How the new Association data structure would be used ...
49
votes
3answers
4k views

Changing Values in an Association using Map

I am trying to change the value of one key in an association based on the value of another key in that association. So if my association starts as: ...
34
votes
3answers
776 views

Is there a comprehensive list of functions with operator forms?

As of version 10, Mathematica sports operator forms for many functions like Map, SortBy, ...
18
votes
6answers
5k views

How to completely delete the head of a function expression

Is there any way to completely remove the head of an expression function? For example, how would I remove the head Cos from ...
36
votes
2answers
2k views

Define parameterized function

I would like to be able to define the gain function of a system from its parameters. Specifically, I'd like to define a function that accepts two inputs, call them $b$ and $w$, and returns a function ...
30
votes
2answers
1k views

What is the difference between Composition (@*) and sequential applications (@)?

What is the difference between f@*g@*h@x and f@g@h@x Both evaluate to f[g[h[x]]] ...
33
votes
2answers
2k views

Going full functional (Haskell style)

I'm trying to define some notation so that Mathematica code would be more functional, similar to Haskell (just for fun): currying, lambdas, infix operator to function conversion, etc.. And I have some ...
36
votes
1answer
2k views

How to export a Mathematica notebook into Markdown?

Is there a way to export a Mathematica notebook into Markdown? I'm sure it's possible to implement rules for converting each Mathematica cell subexpression into Markdown, but I'm also sure that I ...
10
votes
5answers
435 views

Split according to List and apply rule

I have a list which looks some thing like this {a1, a2, a3, a4, a5, a6, a7, a8, a9, a10} Now I want to split it according to lengths ...
7
votes
6answers
971 views

Partial sum of a list

The problem I have is really basic but I just can't get my head around it. Suppose I have a list of ordered pairs A = {{a, b}, {c, d}, {e, f}, {g, h}, ...}. I ...
10
votes
2answers
580 views

Unexpected behavior when using SortBy as a dataset filter

I am still experimenting with datasets. Recently I tried to query the Titanic example to get info on the oldest passengers. Here is what I tried ...
7
votes
3answers
1k views

Postfix with two arguments

This must be a duplicate but I can't find any related post. I want to pass two arguments to a function using postfix syntax like f[a_,b_]:=a+b; 1,2//f More ...
6
votes
3answers
286 views

How to use `in` for MemberQ

I'd like to use for MemberQ, but I don't want to break anything! The usage would be like this: ...
11
votes
2answers
392 views

Built-in symbols that support operator form [duplicate]

In version 10 some built-in symbols are updated to support operator form like the Derivative. For example, Select, ...

15 30 50 per page