subject

Define a SCHEME function, named (eval-postfix p), that will take postfix expression (stored in a list of integers representing operands and characters representing operators), evaluate that expression, and return the result. Your function should support the operations of addition (#+), subtraction (#-), multiplication (#*), divi- sion(#/), and exponentiation(#\ˆ). You may want to work incrementally by starting with a function that takes a character representing an operator and can pop two operands off of a stack, evaluate the operator and push the result back on the stack. Next you can add a function that evaluates a postfix expression by pushing operands onto the stack and evaluating operators when encountered. Note, you may want to use the number? function to determine whether an item in the list is an operand or an operator.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 04:31
Q13 what function does a security certificate perform? a. creates user accounts b. scrambles data c. identifies users d. creates password policies e. provides file access
Answers: 1
question
Computers and Technology, 24.06.2019 14:30
Two students are discussing electricity that has a frequency of 60 hz. student a says that this type of electricity is referred to as ac. student b says that in this type of electricity, the electrons flow in only one direction. which of the following statements is correct? a. only student a is correct b. only student b is correct c. both of the two students are correct d. neither of the two students is correct
Answers: 1
question
Computers and Technology, 24.06.2019 16:00
How are roger williams, james oglethorpe, and william penn similar?
Answers: 3
question
Computers and Technology, 25.06.2019 01:30
Why is the most liked picture on instagram an eggy? owo
Answers: 1
You know the right answer?
Define a SCHEME function, named (eval-postfix p), that will take postfix expression (stored in a lis...
Questions
question
Mathematics, 03.03.2020 06:46
question
Physics, 03.03.2020 06:46
question
Social Studies, 03.03.2020 06:46
question
Mathematics, 03.03.2020 06:47
question
Mathematics, 03.03.2020 06:47
question
Biology, 03.03.2020 06:47
Questions on the website: 13722363