Computer Science up in this bitch.
For my CPSC 401 class, my partner Dan Bowen and I have to host a webpage for our experiences with the functional language Clojure (runs off of the java virtual machine). We haven’t done much reading or tested much of it out as of yet, but as we begin our work we will post items to include code, journal entries, and any other requirements we may have. Since it runs on the JVM…maybe we’ll find a way of writing some code that will actually have an effect on this page? We’ll have to wait and see : D
for the meantime:
bool hungry = true;
comfort eat(food){
if (food.getAmount() > 0){
eat(food);
}else{
hungry = false;
return;
}
}
int main(){
food = new Food(inFridge);
while(hungry){
/*look for food*/
if (find(food)){
eat(food);
}else{
/*sad*/
eat(nothing);
}
}
Toodles,
Crazylegs
Add a comment