Home  |   Notes  |   Languages  |   Programs  |   Homework

project 2 question

New Message Reply About this list Date view Thread view Subject view Author view

vnarula (vnarula@VT.EDU)
Wed, 24 Oct 2001 14:15:16 -0400


Message-ID:  <3BFF4B01@zathras>
Date:         Wed, 24 Oct 2001 14:15:16 -0400
From: vnarula <vnarula@VT.EDU>
Subject:      project 2 question

For the iload command I use the list-ref function to get the value to be
loaded.

(list-ref variableList num1)

Then I want to add that number to my stack. My stack is called beginning so I
just do a cons.

(cons (beginning) (list-ref variableList num1))

In one of my example cases beginning is (3 2) and the list-ref function
returns 5.

I have tried many variations of this but I usually get an error message saying
that the object is not applicable. Could someone help me out with this?


New Message Reply About this list Date view Thread view Subject view Author view

Home  |   Notes  |   Languages  |   Programs  |   Homework
copyright © 2001 Virginia Tech, ALL RIGHTS RESERVED
Class site maintained by Stephen H. Edwards <edwards@cs.vt.edu>