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.
These things get retired fast
No, should be good now as far as I can tell.
Time to republish.
map
->fmap
&id
->identity
All the issues should be resolved. Let me know if I missed anything.
I am removing
**kwargs
. While I would put it in a library to use in my own code, it makes the exercise more complicated than needed.Python and Haskell are similar in this way. They both specializized
map
to lists, but it should be generic. Because of the similar history, I think usingfmap
would be fine here. I do want to keep map in this kata instead of using lift since seeing the connection to list's map is part of the point. I also thought aboutlift2
,liftN
, etc, but given Python's *args feature I thought it would be appropiate to just haveliftN
.You could rename
map
tolift1
, andlift
in the other kata toliftN
, with the option to havelift2
,lift3
, ..In my head, mapping happens over lists, not over arguments, that would be ( one instance of ) fmapping. But I understand lifting. ( I have some experience with Haskell. )
No random tests
kwargs
is not in description but suddenly pops up in Initial code. It is then not tested with.Multiple issues should be addressed before this collects unnecessarily many downvotes.
0
,''
,[]
, ...)map
andid
are builtin functions, hiding builtins is bad practice