How to produce a function mult-stream

Assignment Help Computer Engineering
Reference no: EM132487

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: EM132487

Questions Cloud

Determine ordering cost per order : Determine ordering cost per order
How large would the salvage value of the automated equipment : How large would the salvage value of the automated equipment have to be to make the investment in the automated equipment financially attractive?
Elements to be considered in the design of a workstation : What is a workstation? What are the main elements to be considered in the design of a workstation. How would you improve the design of a standing workstation by the application of sound ergonomic principles.
Evaluate profit and loss for given case : Write journal entries for each transaction and Evaluate profit and loss for given case
How to produce a function mult-stream : How to produce a function mult-stream.
Write journal entries for each transaction : Write journal entries for each transaction and What is Nicole's Getaway Spa's gross profit percentage?
Define and explain workplace violence : Define and explain workplace violence. What are the various forms of workplace violence? Illustrate your answer with various examples.
Program on wireless connection technology : Program on wireless connection technology.
Explain why lumbar belts are not very effective : Briefly describe a good handling technique that could be adopted by a person required to lift a load from the ground Explain why lumbar belts are not very effective in preventing back injuries at work

Reviews

Write a Review

Computer Engineering Questions & Answers

  Library management system

Prepare a module which can exhibit the Library Management System

  Problem on troubleshooting dns records

Problem on Troubleshooting DNS Records

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  What is home wireless network and security

What is home wireless network and security Methodology- Review topics covered in lecture hours, from textbook, reference books plus online research, to behaviour a comprehensive study about wireless network security implementation at home.

  Explain the method to create a scheme for vb mail order

Explain the method to create a scheme for VB Mail Order

  How a box of caramel delites girl scout cookies

How to a box of Caramel deLites Girl Scout cookies Every spring you looking forward to buying a box of Caramel deLites Girl Scout cookies

  What profit do you see with partitioned view

Explain your idea for a database along with your thoughts for a partitioned view. 1. How will you use this partitioned view?

  How to write a program to find a traffic violation number

How to write a program to find a traffic violation number?

  How to generate 2 instances of time and date

generate an application that uses both Time and Date classes How to generate 2 instances of Time and Date

  Describe stages of the processor

Describe the decode stage and Describe the execution stage of add, andi, mul, divi, and neg.

  Determining the priority of period of execution of irqj

Determining the priority of period of execution of IRQJ

  How to create the clients by service rep report

How to create the clients by service rep report create mailing label for client table

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