60,492 reputation
6179273
bio website mathprogramming-intro.org
location St. Petersburg, Russia
age 38
visits member for 2 years, 10 months
seen 1 hour ago

Ok, an obligatory note: opinions expressed here are mine and not those of my employer.


Jan
13
comment Is it possible to use PatternTest and Optional value on one Pattern simultaneously?
Good to know that it is useful, thanks.
Jan
13
comment Is it possible to use PatternTest and Optional value on one Pattern simultaneously?
@Rojo Re: small world - very true.
Jan
13
comment Is it possible to use PatternTest and Optional value on one Pattern simultaneously?
@rm-rf I suggested to delete mainly to have a single place with an exhaustive answer, rather than things scattered over several places. I don't have a strong opinion on the matter, though - can keep it as well.
Jan
13
comment Is it possible to use PatternTest and Optional value on one Pattern simultaneously?
@Mr.Wizard Yes, please do merge my comment into your answer, and then I will delete mine. I completely forgot about that question.
Jan
13
comment Is it possible to use PatternTest and Optional value on one Pattern simultaneously?
@rm-rf I added some more stuff here that you may find interesting too.
Jan
13
revised Is it possible to use PatternTest and Optional value on one Pattern simultaneously?
Added discussion of an associated subtlety
Jan
13
comment Is it possible to use PatternTest and Optional value on one Pattern simultaneously?
@rm-rf That seems to be a typical situation with the docs for tricky cases - they are literally correct (for most cases), but they may give an impression that something isn't possible while it really is.
Jan
13
revised Is it possible to use PatternTest and Optional value on one Pattern simultaneously?
deleted 57 characters in body
Jan
13
comment Is it possible to use PatternTest and Optional value on one Pattern simultaneously?
@rm-rf I was thinking that this is a common place, since I personally use this all the time (in particuar, I am sure that I used this form in many of my posts here). Apparently, it seems to be not.
Jan
13
comment Is it possible to use PatternTest and Optional value on one Pattern simultaneously?
Make sure you have a look at my answer. I think the answer is yes.
Jan
13
answered Is it possible to use PatternTest and Optional value on one Pattern simultaneously?
Jan
13
awarded  Nice Answer
Jan
13
comment Concatenate strings from different levels of list
Looks like you've nailed it, +1. Generally, I found recursion to be more powerful than rules + ReplaceRepeated, but here apparently the latter is enough. Nice solution!
Jan
13
comment Concatenate strings from different levels of list
@Mr.Wizard To tell you the truth, I've been disappointed in the methods like those based on many nested Map,Thread etc. for a long time, as long as treatment of trees and other recursive structures is concerned. The biggest problem with them is that they realize recursion internally, while what is needed is a custom recursion tuned to a very particular data structure. But they work very well as a part of a recursive solution, making the code much shorter indeed.
Jan
13
comment Concatenate strings from different levels of list
@Mr.Wizard Somehow we have different results. In my case, there are more strings, but all of them contain 3 parts (for this particular case). You have less strings but some of them containing more parts.
Jan
13
comment Pure Functions with Lists as arguments
Thanks, @Rojo :) The 99999 words in the most problematic part, have to do something with it. As for the preamble, this time it was ordered by rm -rf.
Jan
13
answered Concatenate strings from different levels of list
Jan
12
comment Confused behavior using Dispatch to sort one list relative to another
Thanks, @Todd. I have had these plans for the second book exactly along the lines you described, for quite a while. Alas, don't have enough time to move this project along with the speed it deserves.
Jan
12
revised Confused behavior using Dispatch to sort one list relative to another
added 228 characters in body
Jan
12
answered Confused behavior using Dispatch to sort one list relative to another