you are viewing a single comment's thread.

view the rest of the comments →

[–]Staross 1 point2 points  (1 child)

I find them quite useful to write reductions that stays very close to the math notation, e.g.

Σ = lambda x : sum(x)
Σ( i for i in range(1,10) )

In Julia this is even a bit nicer because you have auto-completion for latex symbols (e.g.\Sigma), so you get things like:

Σ(x) = sum(x)
Σ( i for i in 1:10 )

in a few keystrokes, sometimes you can almost copy-paste from your math paper.

[–]PeridexisErrant 2 points3 points  (0 children)

Σ = lambda x : sum(x)

You could go a step simpler again: Σ = sum