Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

can someone help me answer the following #Fsharp multiple choice questions along

ID: 3880525 • Letter: C

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 '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

Explanation / Answer

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:

Option:D

Answer:int list -> bool list

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

Option:B

Answer:Their built-in functions are polymorphic.

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

Option:A

Answer:1::2::3::[]

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at drjack9650@gmail.com
Chat Now And Get Quote