[Date Index] [Thread Index] [Author Index]
Lisp-like let in Mathematica?
Are functions like RealizeGraphicMatroid[G_] := IncidenceMatrix[#] - IncidenceMatrix[ReverseEdges[#]] & @ OrientGraph[G] // Transpose considered to be good Mathematica style? This does what I want, but it has the problem of being written in a right-to-left-to-right style. Is there an operator that works like let in Lisp that can give a local name to a temporary value in an easier to read way? I guess something like Let[a_ , b_, body_] := (body /. a -> #) & @ b would work, but I'm relatively new to Mathematica and was wondering if there is a built-in or less clunky solution. ^L