🍔Quiz

6 questions to test your memory

1. Who is the father of the F♯? ⏱ 10’’

A. Anders Hejlsberg

B. Don Syme

C. Scott Wlaschin

Answer

A. Anders Hejlsberg ❌

→ Father of C♯ and TypeScript!

B. Don Syme ✅

dsymetweets • 🎥 F♯ Code I Love

C. Scott Wlaschin ❌

→ Famous blog F♯ for Fun and Profit, a gold mine for F♯


2. What is the name of the :: operator? ⏱ 10’’

A. Append

B. Concat

C. Cons

Answer

A. Append ❌

List.append : concatenation of 2 lists

B. Concat ❌

List.concat : concatenation of a set of lists

C. Cons ✅

newItem :: list is the fasted way to add an item at the top of a list


3. Find the intruder! ⏱ 15’’

A. let a = "a"

B. let a () = "a"

C. let a = fun () -> "a"

Answer

B and C are functions, while A is a simple value: a string.

A. let a = "a"

B. let a () = "a"

C. let a = fun () -> "a"


4. What line does not compile? ⏱ 20’’

 let evens list =
     let isEven x =
     x % 2 = 0
     List.filter isEven list
Answer
 let evens list =
     let isEven x =
     x % 2 = 0 // 💥 Error FS0058: Unexpected syntax or possible incorrect indentation
     List.filter isEven list

Line 3. x % 2 = 0 : an indentation is missing


5. What is the name of |> operator? ⏱ 10’’

A. Compose

B. Chain

C. Pipeline

D. Pipe

Answer

A. Compose ❌ - Composition operator is >> 📍

B. Chain ❌

C. Pipeline ❌

D. Pipe ✅


6. Which expression compiles? ⏱ 20’’

A. a == "a" && b != "*"

B. a == "a" && b <> "*"

C. a = "a" && b <> "*"

D. a = "a" && b != "*"

Answer

C. a = "a" && b <> ""

Operator
C♯
F♯

Equality

==

=

Inequality

!= (!=)

<> (<>)

Last updated

Was this helpful?