Question: can someone help me answer the following #Fsharp multiple choice questions along with explanations for each question please. 1. If an F# function has type

can someone help me answer the following #Fsharp multiple choice questions along with explanations for each question please.

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:

A.(float -> float) -> bool

B.string -> (int -> int)

C.int -> int

D.int list -> bool list

2.Which of the following statements about F# lists is not true? Select one:

A.They are immutable.

B.Their built-in functions are polymorphic.

C.They can be of any length.

D.They can be heterogeneous.

3.Which of the following F# expressions evaluates to [1; 2; 3]? Select one:

A.1::2::3::[]

B.1@2@3@[]

C.[1; 2; 3]::[]

D.((1::2)::3)::[]

4.How does F# interpret the expression List.map List.head foo @ baz? Select one:

A.(List.map List.head) (foo @ baz)

B.((List.map List.head) foo) @ baz

C.List.map (List.head (foo @ baz))

D.(List.map (List.head foo)) @ baz

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!