Noon Silk
Reputation
278
Next privilege 300 Rep.
Create tags
 Mar24 comment How to make a binary function associative? (Or define an n-ary function?) Yeah, I won't be editing that file. It seems crazy that I can't make this operator associative! Mar22 comment How to make a binary function associative? (Or define an n-ary function?) Well, in my case I'm actually performing a matrix direct sum, so I wanted the direct sum symbol. And that operation is associative. So how do I make CirclePlus be associative in the way I want? Mar22 accepted How to make a binary function associative? (Or define an n-ary function?) Mar22 comment How to make a binary function associative? (Or define an n-ary function?) I did not see the second underscore there; indeed -- seeing it instantly evaluate is what I want to see! With the underscore this works. Thanks! Mar22 comment How to make a binary function associative? (Or define an n-ary function?) I can't format the code properly in the comment so I've added it as an edit to the original post. Mar22 revised How to make a binary function associative? (Or define an n-ary function?) added 233 characters in body Mar22 comment How to make a binary function associative? (Or define an n-ary function?) No. This is what I have: In[13]:= f[a_,b_]:=a+b; f[a_,b_,c_]:=f[f[a,b],c] CirclePlus=f; 1[CirclePlus]2[CirclePlus]5[CirclePlus]6 Out[16]= f[1,2,5,6] Mar22 comment How to make a binary function associative? (Or define an n-ary function?) Yes, I did try it. Did you? Mar22 revised How to make a binary function associative? (Or define an n-ary function?) added 127 characters in body Mar22 comment How to make a binary function associative? (Or define an n-ary function?) This only works if I have only three terms; it doesn't make it generally associative (i.e. it doesn't work if there are 4 terms.) Mar22 asked How to make a binary function associative? (Or define an n-ary function?) Jul2 awarded Curious Jul20 awarded Yearling Jul11 comment Clickable Bounded Diagram Thank's alot! (Extra letters to pass 15 character limit.) Jul11 accepted Clickable Bounded Diagram Jul11 revised Clickable Bounded Diagram added 258 characters in body Jul11 comment Clickable Bounded Diagram @Anon - Sorry, it's probably because I forgot to add the 'Needs' statement there; this question is within the ComputationalGeometry package. Jul11 revised Clickable Bounded Diagram added needs statement Jul11 asked Clickable Bounded Diagram Mar24 comment How to generate a list from an iterator and some arbitrary function Thanks; I think your block approach is turning out to be perhaps what I'm after.