6 kyu
Tricky Kotlin #0: extension constructor
220ice1000
Description:
This is a series of Kotlin tricks.
As we all know, Kotlin supports something called extension methods
, which means you can add some methods to some existing classes.
In this Kata, you should make some extension constructor
. For example, you can add a constructor to kotlin.Int
that accepts a String
and parse the string to int.
You should add such extension constructor to kotlin.Int
, kotlin.Long
, kotlin.Double
.
Fundamentals
Similar Kata:
Stats:
Created | Sep 9, 2017 |
Published | Sep 9, 2017 |
Warriors Trained | 752 |
Total Skips | 133 |
Total Code Submissions | 810 |
Total Times Completed | 220 |
Kotlin Completions | 220 |
Total Stars | 18 |
% of votes with a positive feedback rating | 91% of 54 |
Total "Very Satisfied" Votes | 48 |
Total "Somewhat Satisfied" Votes | 2 |
Total "Not Satisfied" Votes | 4 |
Total Rank Assessments | 6 |
Average Assessed Rank | 6 kyu |
Highest Assessed Rank | 6 kyu |
Lowest Assessed Rank | 7 kyu |