1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
nikklg [1K]
3 years ago
14

1. If an F# function has type 'a -> 'b when 'a : comparison, which of the following is not a legal type for it? Select one:

Computers and Technology
1 answer:
Stella [2.4K]3 years ago
7 0

Answer:

B. string -> (int -> int)

Explanation:

We are going to perform comparison operations '->'. It is important to notice that the comparison operation gives us a bool value (True or False) and the comparison operation is legal if and only if the data types to be compared are the same.

Example:

int(4)->int(5) False

int(4)->int(4) True

int(4)->string(4) Error, data types don't match

For this reason:

  • A. Is legal because float -> float evaluates to True, True is a boolean value and bool -> bool is legal because both are the same data type.
  • B. Is illegal because int -> int evaluates to True, True is a boolean value and string is not a boolean (string -> bool).
  • C. Is legal because int is the same type than int.
  • D. Is legal because the list is the same type than list regardless it's content.

Note:

The operations inside parentheses are evaluated first.

List is a type by itself regardless of its content.

You might be interested in
While you are working on your computer, it shuts down unexpectedly, and you detect a burning smell. When you remove the case cov
kumpel [21]

Answer:

fire

Explanation:

hydrant

6 0
3 years ago
During a user’s onboarding process, many designers focus on a gradual release of information. This process is called what?
mrs_skeptik [129]

progressive disclosure

3 0
2 years ago
What is a device that connects to the system unit and is controlled by the processor in the computer called !
Airida [17]
Most computers have three types of ports: serial, parallel, and USB. A serial port is a type of interface that connects a device to the system unit by transmitting data only one bit at a time. Serial ports usually connect devices that do not require fast data transmission rates, such as a mouse, keyboard, or modem.
4 0
3 years ago
What service converts ip addresses into more recognizable alphanumeric names??
tresset_1 [31]
I think is DNS..........
6 0
3 years ago
The postorder and preorder traversal of a binary tree are given below - postorder : D E B F G C A preorder : A B D E C F G respe
jeka57 [31]

Answer: The answer is A

Explanation:

in  the attachment

6 0
3 years ago
Other questions:
  • Spreadshet formula to add totals​
    12·1 answer
  • If there is a mistake with one of your bank accounts, who should you contact to resolve the issue
    14·1 answer
  • A customer in a store is purchasing 5 items. Write a python program that asks for the price of each item and display the subtota
    14·1 answer
  • Write down the steps that you will take to organize your files
    12·2 answers
  • 4. An abstract data type is defined as _____.
    14·1 answer
  • How do you customize Track Changes in a text document?
    11·1 answer
  • Consider the relational schema below: Students(sid: integer, sname: string, major: string) Courses(cid: integer, cname: string,
    9·1 answer
  • SummaryIn this lab, you complete a partially written C++ program that includes a function named multiplyNumbers() that multiplie
    13·1 answer
  • Of what is famous Ted Nelson?​
    8·1 answer
  • True and False(Total points: 10)
    12·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!