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.
Function arguments are named and represented inconsistently in the description and the initial solution ( and possibly other places ).
I'd suggest calling them by the same name everywhere, and representing specifically the
f
argument ( the first one ) as a string, which ATM it is, and not as a function ( which ATM it is not ) in the description examples. I haven't checked the test headers, but the same goes for them. Should you decide to make the first argument a function, then of course represent it as a function everywhere.This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
It appears the
x
parameter is the middle of the output grid. That middle is of course defined by two coordinates, and it would seem itsy
coordinate is also defined byx
.Is this correct; is this the best way to define the middle of the grid ( I think not ); and if correct, shouldn't this be described more fully?
Use appropriate datatypes. The function argument could be a function, unstringified.
This would also facilitate translations into languages that do not have
eval
, like Haskell; I would like to translate this into Haskell, but I'd have to write a parser from string to function and put it inPreloaded
( that's what it is for ), because writing a parser is a bit outside the scope of this kata.This comment is hidden because it contains spoiler information about the solution