Write a version of sum pairs i that sums each component

Assignment Help Basic Computer Science
Reference no: EM13163238

Using SML write a version of sumPairs that sums each component of the pairs separately, returning a pair consisting of the sumof the first components and the sum of the second components

 

fun sumPairs(nil) = 0

| sumPairs((x,y)::zs) = x + y + sumPairs(zs);

 

val sumPairs = fn : (int * int) list -> int

 

 

Reference no: EM13163238

Questions Cloud

Client-professional relationship-meat and potatoes : Assessment and goal setting are the "meat and potatoes" of the professional interview. In addition, assessments help both the professional and the client identify goals to work toward in the client-professional relationship.
Write a function that takes a list of integers : Using ML write a function that takes a list of integers as argument and returns a pair consisting of the sum of the even position and the sum of the odd positions of the list.
What is the composition of the mixture by volume : A gas mixture composed of helium and argon has a density of 0.853g/L at a 745mmHg and 298K .What is the composition of the mixture by volume?
What will be the volume of the gas sample : A gas sample has an original volume of 760 ml when collected at 720 mm and 25degC. What will be the volume of the gas sample if the pressure increases to 820 mm and the temperature increases to 30degC?
Write a version of sum pairs i that sums each component : Using SML write a version of sumPairs that sums each component of the pairs separately, returning a pair consisting of the sumof the first components and the sum of the second components
What is a triple point : Carbon tetrachloride, CCl4, is nonpolar. What forces hold the molecules together?
Calculate the actual neutralizing capacity of the antacid : If 0.500 g of antacid was added to 50.00 mL of 0.100 M HCL and 5.65 mL of 0.100 M NaOH was required to titrate the un-neutralized HCL, calculate the actual neutralizing capacity of the antacid in mmol H+ per gram.
Determine the keq for the reaction of benzoic acid : The pKa's of benzoic acid and 4-nitroanilinium hydrochloride are 4.2 and 1.0, respectively.
What is the vapor pressure of water : The vapor pressure of water at 20oC is 17.5 mmHg. What is the vapor pressure of water (in mmHg) over a solution prepared from 258 g sucrose (C12H22O11) and 350 g water?

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Creating a payoff table for decision

Amy decided to select the best option which will minimize her total 36-month cost. Difficult is that Amy is not sure how many miles she will drive over next three years. Create payoff table for Amy's decision.

  Explain diagnosing and troubleshooting excel-based problems

How does versatility of Excel affect application support? Because of its versatility, write assumptions should be made when diagnosing and troubleshooting Excel-based problems?

  Identify people to interview to learn new training activity

Draft a project scope statement for the TIMS system and describe the constraints. She said be specific. Need to identify the people want to interview to learn more about the new training activity, and prepare a list of the questions I will ask.

  How silicon-based semiconductors revolutionized computing

New materials frequently lead to new technologies that change society. Describe how silicon-based semiconductors revolutionized computing.

  Estimate benefit of a revenue-generating system

Is management able to estimate the benefit of a revenue-generating system or must the system be built on faith? Why?

  Guidelines to pre-test the designed survey

One of the guidelines is to pre-test the designed survey on a few participants to see what might be unclear or weak in the survey design.

  Distinguish object frameworks-components-system installation

Distinguish object frameworks and components in terms of ease of modification before system installation, ease of alteration after system installation, and overall cost savings from code reuse.

  Method named printgrid

Write a method named printGrid that accepts two integer parameters rows and cols. The output is a comma-separated grid of numbers where the first parameter (rows) represents the number of rows of the grid and the second parameter (cols) represents th..

  Development of enterprise architecture-existing it resources

Discuss what concepts are important to share during this presentation in particular. Also discuss, in general, the relationship between development of enterprise architecture and existing IT resources and processes.

  Computer will ever be developed which can think like human

Do you think a computer will ever be developed which can think like human? Write down the ethical implications of creating such a computer?

  Approach appropriate for company forefront of technology

However, adopting a secondary approach where others adopt early and a firm learns from their mistakes is often a viable strategy. When is each approach most appropriate and why?

  Techniques attacker use to access information on system

Recognize all potential security threats on home personal computer. Recognize some of techniques the attacker might use to access some information on system.

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