Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Scheme Challenge

Name: Anonymous 2009-06-19 22:40

Write a scheme program that does anything that would be significantly more verbose if coded in another language. 
Size should be measured in characters (wc -m), non-signficant white space should not be counted.

Name: Anonymous 2009-06-20 9:22


//Conway's game of life
void life(int[][] cur){
 int[][] next=new int[w][h];
 for(int i=0;i<w;i++)
 for(int j=0;j<h;h++){
  int n=0;
  for(int a=-1;a<2;a++)
  for(int b=-1;b<2;b++){
   n+=cur[(a+i)%w][(b+j)%h];
  } 
  if(cur[i][j]==1&&n==4||n==3)
  next[i][j]=1;
 }
 life(next);
}

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List