Questionproduce a function mult-stream that takes as input

Assignment Help Computer Engineering
Reference no: EM13348542

Question

Produce a function mult-stream, that takes as input two arguments-

The first argument is a multiplier m, which is a positive integer.

The second argument is a stream strm of digits, representing digits in the decimal representation of a number between 0 and 1. You may suppose that number does not end in an infinite string of 9's.

The function mult-stream makes a stream which is the decimal representation of product of m with number represented by strm. Don't worry about where decimal point goes for this assignment. (Of course, in practice that would be very important! It's not at all hard to figure out, but it's not what I'm concerned about right here.)

Wherever in the course of doing this, you will probably need a function that you might want to name

number->list-of-digits
that takes a non-negative integer as input and returns the directory of single digits that make up decimal representation of that integer. There are a variety of ways to do this. One way is to use some of built-in Scheme functions that operate on strings and characters, such as
number->string
string->list
char->integer

If you do this, please be sure to notice that char->integer returns the ASCII value of a character, so if the character is "3", for instance, what is returned from char->integer is not the number 3. So you will have to alter for that as well.

 

Reference no: EM13348542

Questions Cloud

Questionshoogi perak limited is a manufacturer of pictures : questionshoogi perak limited is a manufacturer of pictures tubes used in assembling t.v sets. the subsequent are
Questionrosenholm corporation uses a discount rate of 18 in : questionrosenholm corporation uses a discount rate of 18 in its capital budgeting. partial analysis of an investment in
Question 1a what kind of workplace problems can ergonomics : question 1a what kind of workplace problems can ergonomics solve and how would you identify these problems? in what
Questiongeorge buckner sells an apartment building on : questiongeorge buckner sells an apartment building on october 10th of the current year for 1.75 million. the building
Questionproduce a function mult-stream that takes as input : questionproduce a function mult-stream that takes as input two arguments-the first argument is a multiplier m which is
Questionnicoles getaway spa ngs has been so successful that : questionnicoles getaway spa ngs has been so successful that nicole has decided to expand her spa by selling
Question 1an accident isan occurrence which interrupts or : question 1an accident isan occurrence which interrupts or interferes with the orderly progress of work in an industrial
Questionyour employer xelpharm is a large manufacturer and : questionyour employer xelpharm is a large manufacturer and distributor of generic over- the-counter healthcare
Question 1a describe the health hazards that may be : question 1a describe the health hazards that may be encountered by cashiers who work at checkouts in hypermarketsb

Reviews

Write a Review

Computer Engineering Questions & Answers

  How might bpr be used in your organization

What is Business Process Reengineering (BPR)? Discuss how BPR might be used and describe the 'theoretical' results.

  Translate following c++ program to pep/8 assembly language

Translate following C++ program to Pep/8 assembly language

  Write down a program that includes a function picnic()

The passed floating-point number represents TOTAL amount of money to be spent on food. The function is to determine the quantity of HOTDOGS, HAMBURGERS,SALAD,PICKLES that can be purchaced, writing these values directly into the respective variable..

  Create a temperature demo program

Make sure you take no input in this class and that it does not contain a main method.

  Explain how the digitization of music has created

Why do you think different digital audio formats exist? Would you support one standard file format for all music in the future? Why or why not.

  Describe a project that increase an intranet

Describe a project that increase an Intranet.

  How many different normal forms to choose from

how many different normal forms to choose from.

  Give a new technology is perceived to be superior

Relative benefit is the degree to that a new technology is perceived to be superior to the current technology.

  Relation schema about teaching classes

Suppose you have a relation schema about teaching classes that has the following attributes: Class, Instructor, Time and Room

  Write a program that swaps the elements of an array pairwise

Write a program that swaps the elements of an array pairwise. Start from the left of the array, take 2 elements at a time and swap the two elements. Continue in this fashion until you reach the end of the array.

  Explain removing zoogloea from wastewater

Removing Zoogloea From Wastewater, Problem statement: A 1 million gallon per day biological wastewater treatment system received influent wastewater containing high concentrations of organic acids (especially acetic acid)

  Write program that generates casual number between 1 and 100

Write program that generates casual number between 1 and 100?

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd