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

More By Author:

Check out these other kata created by vertighel

Stats:

CreatedDec 17, 2018
PublishedDec 17, 2018
Warriors Trained166
Total Skips12
Total Code Submissions84
Total Times Completed62
Scala Completions62
Total Stars1
% of votes with a positive feedback rating89% of 14
Total "Very Satisfied" Votes11
Total "Somewhat Satisfied" Votes3
Total "Not Satisfied" Votes0
Total Rank Assessments4
Average Assessed Rank
6 kyu
Highest Assessed Rank
6 kyu
Lowest Assessed Rank
8 kyu
Ad
Contributors
  • vertighel Avatar
  • suic Avatar
Ad