This course has already ended.
You cannot submit this assignment

You need to sign in and enrol to submit exercises.

Assignment 23

8 points

Let’s define a simple effect-free function that can be used like this (once the function is defined).

yell("Yippee")res1: String = Yippee!
val result = yell("Muhaha")result: String = Muhaha!
val louder = yell(result)louder: String = Muhaha!!

Here’s a template for the function definition. Five parts have been “left blank” and marked with three question marks each.

??? ???(phrase: ???) = ??? + ???

Fill in the blanks: replace the question marks to define a yell function that can be used as in the REPL example. Each of the five blanks calls for a different code fragment. You can model your answer on the average function shown above.

Enter the yell function’s full definition here. (That is, write the above line with the question marks replaced with proper code.)

Posting submission...

Earned points

0 / 8

Exercise info

Assignment category
Graded
Your submissions
0 / 5
Deadline
Wednesday, 14 September 2022, 18:00
Late submission deadline
Saturday, 15 April 2023, 12:00 (-100%)
Group size
1-2
Total number of submitters
988