« first day (1980 days earlier)      last day (2802 days later) » 

16:13
My God,what happen?
16:51
Is this well known?
Position[
 h[{{3, 4, 7}, {4, 8, 7}, {7, 9, 12}, {7, 8, 9}}, {5, 5, 7, 7}],
 {_Integer, _Integer, _Integer}
 ]
(* {{1, 1}, {1, 2}, {1, 3}, {1, 4}} *)
Position[
 TriangleElement[{{3, 4, 7}, {4, 8, 7}, {7, 9, 12}, {7, 8, 9}}, {5, 5,
    7, 7}],
 {_Integer, _Integer, _Integer}
 ]
(* Out: {} *)
Is it because of upvalues on TriangleElement?
 
2 hours later…
18:53
@C.E. - that is indeed odd:
In[35]:= TriangleElement[{{3, 4, 7}, {4, 8, 7}, {7, 9, 12}, {7, 8,
9}}, {5, 5, 7, 7}] // Position[#, _] &
placeHolder[{{3, 4, 7}, {4, 8, 7}, {7, 9, 12}, {7, 8, 9}}, {5, 5, 7,
7}] // Position[#, _] &

Out[35]= {{0}, {1}, {2}, {}}

Out[36]= {{0}, {1, 0}, {1, 1, 0}, {1, 1, 1}, {1, 1, 2}, {1, 1, 3}, {1,
1}, {1, 2, 0}, {1, 2, 1}, {1, 2, 2}, {1, 2, 3}, {1, 2}, {1, 3,
0}, {1, 3, 1}, {1, 3, 2}, {1, 3, 3}, {1, 3}, {1, 4, 0}, {1, 4,
1}, {1, 4, 2}, {1, 4, 3}, {1, 4}, {1}, {2, 0}, {2, 1}, {2, 2}, {2,
3}, {2, 4}, {2}, {}}
For the purposes of Position, it treats the arguments of TriangleElements as being atomic. Not so for Cases though
@JasonB Yes, that is my conclusion as well. But I don't see any reason why TriangleElement should have any special properties...
Maybe @user21 knows why all the XXXElement wrappers behave this way
19:11
@JasonB I will figure this out, I just wanted to see if I missed something obvious. I'm glad you confirmed that I was right to be surprised.
 
4 hours later…
23:20
@JasonB Actually, AtomQ[TriangleElement] gives true. I guess I was just very surprised to find that they are atomic.
sorry, that's my bad. Of course it returns true because it's a symbol... Forgot how to use AtomQ...

« first day (1980 days earlier)      last day (2802 days later) »