kale
Reputation
4,728
Next privilege 5,000 Rep.
Approve tag wiki edits
 Mar31 awarded Popular Question Mar4 awarded Nice Question Jan5 comment Pattern Match and Replace Expression involving Pure Function @Mr.Wizard Email sent. Dec31 comment Pattern Match and Replace Expression involving Pure Function @MrWizard I'd be glad to show you, but it'll require something more substantial than a comment box to explain. I still have your email if you're that interested. Dec31 accepted Pattern Match and Replace Expression involving Pure Function Dec29 asked Pattern Match and Replace Expression involving Pure Function Dec19 comment Astronomy: Transform coordinates from horizon to equatorial Sidereal time can now be computed with the SiderealTime function in version 10. Dec17 awarded Enlightened Dec17 awarded Nice Answer Dec17 accepted ReplacePart equivalent for Associations Dec17 comment ReplacePart equivalent for Associations Oh, I always try to accept answers. Just typically wait to see what shakes out. Dec17 comment ReplacePart equivalent for Associations I figure the pattern error is because Alternatives isn't recognized. And yeah, the way you had it works fine, but to make a true ReplacePart alternative, I'd just like the freedom to decide Rule vs RuleDelayed. Of course, now with 10.0.2, ReplacePart works as I wanted it to and you have just taught me more about meta-programming. Dec16 comment ReplacePart equivalent for Associations (+1 by the way.) Dec16 comment ReplacePart equivalent for Associations Nice. Mine gripes about LHS being used in both fixed and variable length patterns, but whatever. I'd make one change: two definitions for Rule and RuleDelayed -- sub[asc_, RuleDelayed[{LHS__} | LHS_, RHS_]] := asc[LHS] := RHS sub[asc_, Rule[{LHS__} | LHS_, RHS_]] := asc[LHS] = RHS Dec15 comment ReplacePart equivalent for Associations Also the functions may contain random variables or distributions, so I think I'm stuck with the deferred assignments. Dec15 comment ReplacePart equivalent for Associations Glad to see this was remedied in 10.0.2. I'll be contacting my IT folks tomorrow. And yes, the deferred functions are necessary as the phase function are sometimes dependent on one another and may not be defined in order of dependence. Thanks! Dec15 revised ReplacePart equivalent for Associations edited body Dec15 asked ReplacePart equivalent for Associations Nov16 awarded Popular Question Oct27 comment What is the meaning of //N in mathematica? @rcollyer Agreed, but regardless is a good intro to Postfix notation.