Practice question from FSharp Programming

Complete the immutable list creation in F#:

let myList = ____ [1; 2; 3]
let newList = ____ 4 myList

Answer

["List.empty","List.cons"]

Explanation

List.empty creates an empty list, and List.cons prepends an element to an existing list

More questions from Quick: FSharp Programming