F# Training
F# Training
F# Training
  • Presentation
  • Fundamentals
    • Introduction
    • Syntax
      • Bases
      • Functions
      • Rules
      • Exceptions
    • First concepts
    • šŸ”Quiz
  • Functions
    • Signature
    • Concepts
    • Syntax
    • Standard functions
    • Operators
    • Addendum
    • šŸ”Quiz
    • šŸ“œSummary
  • Types
    • Overview
    • Tuples
    • Records
    • Unions
    • Enums
    • Anonymous records
    • Value types
    • šŸ“œRecap
    • Addendum
  • Monadic types
    • Intro
    • Option type
    • Result type
    • Smart constructor
    • šŸš€Computation expression (CE)
    • šŸš€CE theoretical basements
    • šŸ“œRecap
  • Pattern matching
    • Patterns
    • Match expression
    • Active patterns
    • šŸš€Fold function
    • šŸ“œRecap
    • šŸ•¹ļøExercises
  • Collections
    • Overview
    • Types
    • Common functions
    • Dedicated functions
    • šŸ”Quiz
    • šŸ“œRecap
  • Asynchronous programming
    • Asynchronous workflow
    • Interop with .NET TPL
    • šŸ“œRecap
  • Module and Namespace
    • Overview
    • Namespace
    • Module
    • šŸ”Quiz
    • šŸ“œRecap
  • Object-oriented
    • Introduction
    • Members
    • Type extensions
    • Class, Struct
    • Interface
    • Object expression
    • Recommendations
Powered by GitBook
On this page
  • 1. Who is the father of the F♯? ā± 10’’
  • 2. What is the name of the :: operator? ā± 10’’
  • 3. Find the intruder! ā± 15’’
  • 4. What line does not compile? ā± 20’’
  • 5. What is the name of |> operator? ā± 10’’
  • 6. Which expression compiles? ā± 20’’

Was this helpful?

Edit on GitHub
  1. Fundamentals

Quiz

6 questions to test your memory

PreviousFirst conceptsNextSignature

Last updated 1 month ago

Was this helpful?

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 āœ…

→ • šŸŽ„

C. Scott Wlaschin āŒ

→ Famous blog , 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

!= (! =)

<> (< >)

šŸ”
dsymetweets
F♯ Code I Love
F♯ for Fun and Profit