6 kyu
[Scala] Language Features: Make It Type Check!
Description:
In some programming languages, you can do things like n = 3 + true
(will evaluate to n == 4), or if (42) ...
(will evaluate to true).
If you try this in Scala, you will get a type error. However, you can use some Scala language features to emulate this behavior. (Whether that is a good idea is a different topic!)
Your task: add some code to the Kata
class to make the test cases work as described. The final test cases will be the same as the initially loaded example test cases.
Fundamentals
Similar Kata:
Stats:
Created | Dec 17, 2018 |
Published | Dec 17, 2018 |
Warriors Trained | 166 |
Total Skips | 12 |
Total Code Submissions | 84 |
Total Times Completed | 62 |
Scala Completions | 62 |
Total Stars | 1 |
% of votes with a positive feedback rating | 89% of 14 |
Total "Very Satisfied" Votes | 11 |
Total "Somewhat Satisfied" Votes | 3 |
Total "Not Satisfied" Votes | 0 |
Total Rank Assessments | 4 |
Average Assessed Rank | 6 kyu |
Highest Assessed Rank | 6 kyu |
Lowest Assessed Rank | 8 kyu |