This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Choose the best response for each question.
How do you return from a function?
The last row of the function is the return value.
You use the return keyword.
return
You declare a variable called return and place it last.
How would you declare the add() function that takes two strings and returns an int?
add()
Write it like let add a b = a + b.
let add a b = a + b
Write it like let add (a:string) (b:string):int = (int a) + (int b).
let add (a:string) (b:string):int = (int a) + (int b)
Write it like let add (a:string) (b:string):bool = (int a) + (int b).
let add (a:string) (b:string):bool = (int a) + (int b)
The following code let addAndMultiply = add >> multiply is doing what?
let addAndMultiply = add >> multiply
Creating a pipeline.
Defining a function.
Creating a composition.
You must answer all questions before checking your work.
Was this page helpful?