Name:
Anonymous
2009-03-04 20:14
#include <stdio.h>
#include <stdlib.h>
unsigned long long rpow(int n, int p) {
return p ? p==1 ? n : n * rpow(n,p-1) : 1;
}
int main(int argc, char **argv) {
if(argv[1])
if(argv[2]) {
int n = atoi(argv[1]);
int p = atoi(argv[2]);
printf("%llu\n",rpow(n,p));
}
return 0;
}
Name:
Anonymous
2009-03-14 18:03
>>162
Now it's full of pointless curried partial implementation. Ah, the wonders of recursion.
Name:
Anonymous
2009-03-14 18:43
>>237
Now it's full of pointless forward references. Ah, the wonders of lazy evaluation.
Name:
Anonymous
2009-03-15 9:31
>>161
wtf can that be used for?
Name:
D
2010-12-06 4:10
The D Programming Language