Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
RealFrac
providestruncate
,round
,ceiling
andfloor
, all of which are quite unnecessary on the providedInt
.Remove the function that needs the
RealFrac
instance from your solution, and remove the type constraint from yoursierpinski
. That should do it.( I know you probably figured this out yourself by now. Hopefully. :P But someone else might benefit. )
Great! Thanks.
If the ratio's importance is not clear in the description, I would definitely like to fix that. In the current description I have:
What is unclear and how would you suggest I clarify that point?
I have modified my "greedy thief" example to include a brief calculation of the ratio:
Hopefully that helps :-)
The regexp (re) takes a digit and any number of repeated instances after it. The substitution takes the regexp match (specified by m in the lambda expression) and replaces it with the length of the full match followed by the digit used.
Think of '111333'