>>16 >>20 >>21 >>22 >>23 >>24 >>25 >>28 >>30 >>31 >>36 >>37 >>39
What part of ``Recursive Character Search and Destroy'' you fail to understand? Or does this mean that none of you sandcore C programmers understand the concept of recursion well enough to write anything except perhaps a factorial function?
If C isn't sandcore enough, here's some brainfuck. ,+[->+>++++++++[<++++++++++++>-]>[-]>[-]>[-]
<<<<[>+>+<<-]<[>+>>>+>+<<<<<-]>[>-<-]>[<<+>>[-]]+>+[<+<+>>-]
>[<+>>>+<<-]>>[<<+>>-]<<<[<<->>-]<<[<+>[-]]>[>>-<<-]
>>[<<<<+>>>>[-]]<<<<[-[-[>>>>>.<<<<<[-]][-]][-]],+]
>>54
lol man at first I was like what is that he's doing but then I saw it and I was like lol all the time because it's so funny when you do that and it always makes me smile because I know these things I try to do them myself but I'm not good at them or anything so like I'd rather watch other people do them because then it's just as funny even though I can't do it myself or anything like that lol
>>56
lol man at first I was like what is that he's doing but then I saw it and I was like lol all the time because it's so funny when you do that and it always makes me smile because I know these things I try to do them myself but I'm not good at them or anything so like I'd rather watch other people do them because then it's just as funny even though I can't do it myself or anything like that lol
lol man at first I was like what is that he's doing but then I saw it and I was like lol all the time because it's so funny when you do that and it always makes me smile because I know these things I try to do them myself but I'm not good at them or anything so like I'd rather watch other people do them because then it's just as funny even though I can't do it myself or anything like that lol
>>61
lol man at first I was like what is that he's doing but then I saw it and I was like lol all the time because it's so funny when you do that and it always makes me smile because I know these things I try to do them myself but I'm not good at them or anything so like I'd rather watch other people do them because then it's just as funny even though I can't do it myself or anything like that lol
>>64
No. Enterprise would never do anything smart, like recursion.
Name:
Anonymous2007-05-12 20:51 ID:1BaoTvIh
>>66
Recursion in general isn't ENTERPRISE QUALITY. However, using recursion to do character removal with O(n^2) space usage is definitely ENTERPRISE QUALITY.
Name:
Anonymous2007-05-15 3:17 ID:vE14gqt1
Recursion involves calling the same function more than once.
WAKEUP PEOPLE!
Name:
Anonymous2007-05-15 4:23 ID:APoogirR
>>68
Dumbass, recursion involves calling the same function FROM ITSELF. It doesn't matter if you call it one time or seven million, as long as the same function is listed in two descendant frames in the backtrace.
Name:
Anonymous2007-05-15 5:05 ID:vE14gqt1
>>69
IT DOES involve calling the same function more than once. I never said otherwise.
void dumbass(unsigned int i) {}
void youare(unsigned int i) {
while (--i) {
thedumbass(i);
}
}
Name:
Anonymous2007-05-15 5:15 ID:vE14gqt1
Correction:
void youarethedumbass(unsigned int i) {
while (--i) {
youarethedumbass(i);
}
}
>>71
Holy shit, that function called itself.
Keep talking, your idiocy amuses me.
Name:
Anonymous2007-05-15 18:57 ID:BzTHZt/W
in java.
public static String tehMassRemoval(char a, char b, char c, String s)
{
for(int i = 0; i<s.length(); i++)
{
if (s.charAt(i) == a || s.charAt(i) == b || s.charAt(i) == c)
{
s = tehMassRemoval(a,b,c,(s.substring(0, i) + s.substring(i+1)));
}
}
return s;
}
Name:
Anonymous2007-05-16 3:17 ID:Qn1G05ZA
if (s.charAt(i) == a || s.charAt(i) == b || s.charAt(i) == c)
ew
I'm surprised noone has done a Haskell version yet. Oh well, here you go: remove a b c = filter (/= a) . filter (/= b) . filter (/= c)
It would of course be trivial to have it take a list of items to remove instead of just 3. Also note that thanks to Haskell's generic-by-default-ness this works on lists of any type, not just strings.