Reputation
1,131
Next privilege 2,000 Rep.
Edit questions and answers
Badges
7 24
Impact
~22k people reached

  • 0 posts edited
  • 0 helpful flags
  • 51 votes cast
May
22
awarded  Good Question
May
7
asked ImageSize in Export
Mar
31
comment Matching x,y,z,2
@rasher Oh, I see. It's totally the way you'd expect it to work for functions.
Mar
31
comment Matching x,y,z,2
@rasher I meant for the list to be grown to the left; sorry, I thought that was clear. As for overlaps, it turns out in my application that they don't matter --- that is, whether they are done sequentially or simultaneously you will eventually get the same result (I am intending to use ReplaceAll once I get this working).
Mar
31
comment Matching x,y,z,2
I understand your point about functions being represented as rules. But is there a reason other than "we chose to do it that way" for filling from right to left, which is to me counterintuitive? I thought about using multiple rules, but figured there had to be a better way.
Mar
30
revised Matching x,y,z,2
added 82 characters in body
Mar
30
asked Matching x,y,z,2
Mar
25
awarded  Popular Question
Mar
20
awarded  Yearling
Mar
11
awarded  Notable Question
Mar
4
comment Determine if all the zeros in a list occur at the end
Accepting this answer because a) it was first, and b) Kuba showed extraordinary perseverance.
Mar
4
accepted Determine if all the zeros in a list occur at the end
Mar
3
comment Determine if all the zeros in a list occur at the end
Sorry, you are correct; I was forgetting about the inversion of the test. Do you have any comments on the discussion we are having in the other answer?
Mar
3
comment Determine if all the zeros in a list occur at the end
So do you understand why one returns False and the other True?
Mar
3
comment Determine if all the zeros in a list occur at the end
Try MatchQ[{1, 1, 0, 0}, {x__ /; x != 0, y__ /; y == 0}] versus MatchQ[{2,3,17, 0, 0}, {x__ /; x != 0, y__ /; y == 0}]. What's up with that? That's why I assumed that pattern didn't work.
Mar
3
comment Determine if all the zeros in a list occur at the end
Also (see edit above) I think this fails in the case where there are no zeros.
Mar
3
revised Determine if all the zeros in a list occur at the end
added 73 characters in body
Mar
3
comment Determine if all the zeros in a list occur at the end
I tried for a while to build the appropriate pattern, but just couldn't get it right. Thanks. Can you educate me --- this is clearly useful, but why doesn't something like {x__/;x!=0,y__/;y==0} work?
Mar
3
comment Determine if all the zeros in a list occur at the end
In that case the list should be acceptable.
Mar
3
asked Determine if all the zeros in a list occur at the end