Database System Concepts
Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
Bartleby Related Questions Icon

Related questions

Question
100%

Hello! I need your assistance for these questions and what are the answers to them.

Thanks.

QUESTION 7
The expression Branch (Tip 1) (Tip 2) is a value of the datatype:
data Tree = Tip Int Branch Int Int
data Tree Tip Tree
data Tree = Tip Tree
data Tree = Tip Int
| Branch Int Int
Branch Tree Tree
Branch
Odata Tree = Tip Int
Branch Tree Tree
QUESTION 8
What is it called when the type of a function contains one or more class constraints?
Curried function
Overloaded function
Pure function
Strict function
Polymorphic function
QUESTION 9
Give the type for the following expression: ("False", "True")
O (Bool, Bool)
O [Bool]
(String, String)
O [String]
O [a]
QUESTION 10
Which of the following is an invalid list in Haskell?
O [[1], [2,3], [4]]
O [[1], [2], [3], [41]
O [[1,2], [3,4]]
O [[1,2,3,4]]
[1, [2,3],4]
expand button
Transcribed Image Text:QUESTION 7 The expression Branch (Tip 1) (Tip 2) is a value of the datatype: data Tree = Tip Int Branch Int Int data Tree Tip Tree data Tree = Tip Tree data Tree = Tip Int | Branch Int Int Branch Tree Tree Branch Odata Tree = Tip Int Branch Tree Tree QUESTION 8 What is it called when the type of a function contains one or more class constraints? Curried function Overloaded function Pure function Strict function Polymorphic function QUESTION 9 Give the type for the following expression: ("False", "True") O (Bool, Bool) O [Bool] (String, String) O [String] O [a] QUESTION 10 Which of the following is an invalid list in Haskell? O [[1], [2,3], [4]] O [[1], [2], [3], [41] O [[1,2], [3,4]] O [[1,2,3,4]] [1, [2,3],4]
QUESTION 4
A function of type (Int -> Int) -> Int:
Takes a pair of arguments
Takes two arguments one at a time
Returns a pair of results
Returns a function as its result
Takes a function as its argument
QUESTION 5
Which of the following statements about Haskell is correct?
All lists must be of finite length.
Type errors can occur at run-time.
All programs are guaranteed to terminate.
Function application brackets to the left.
Recursive functions must have a base case.
QUESTION 6
Consider a function f of type f :: Int -> Int with an output value that is equal the input value. What does the following expression evaluate to?
(\y -> f (y 24)) (\g -> div g 2)
0 1
8
4
9
12
expand button
Transcribed Image Text:QUESTION 4 A function of type (Int -> Int) -> Int: Takes a pair of arguments Takes two arguments one at a time Returns a pair of results Returns a function as its result Takes a function as its argument QUESTION 5 Which of the following statements about Haskell is correct? All lists must be of finite length. Type errors can occur at run-time. All programs are guaranteed to terminate. Function application brackets to the left. Recursive functions must have a base case. QUESTION 6 Consider a function f of type f :: Int -> Int with an output value that is equal the input value. What does the following expression evaluate to? (\y -> f (y 24)) (\g -> div g 2) 0 1 8 4 9 12
Expert Solution
Check Mark
Still need help?
Follow-up Questions
Read through expert solutions to related follow-up questions below.
Follow-up Question

Can you provide me with the answers to the rest of the questions except Question 8, as shown in the images.

Solution
Bartleby Expert
by Bartleby Expert
SEE SOLUTION
Follow-up Questions
Read through expert solutions to related follow-up questions below.
Follow-up Question

Can you provide me with the answers to the rest of the questions except Question 8, as shown in the images.

Solution
Bartleby Expert
by Bartleby Expert
SEE SOLUTION
Knowledge Booster
Background pattern image
Computer Science
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Text book image
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Text book image
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
Text book image
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Text book image
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Text book image
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education