Retired
Optional Functor (retired)
Loading description...
Functional Programming
View
This comment has been reported as {{ abuseKindText }}.
Show
This comment has been hidden. You can view it now .
This comment can not be viewed.
- |
- Reply
- Edit
- View Solution
- Expand 1 Reply Expand {{ comments?.length }} replies
- Collapse
- Spoiler
- Remove
- Remove comment & replies
- Report
{{ fetchSolutionsError }}
-
-
Your rendered github-flavored markdown will appear here.
-
Label this discussion...
-
No Label
Keep the comment unlabeled if none of the below applies.
-
Issue
Use the issue label when reporting problems with the kata.
Be sure to explain the problem clearly and include the steps to reproduce. -
Suggestion
Use the suggestion label if you have feedback on how this kata can be improved.
-
Question
Use the question label if you have questions and/or need help solving the kata.
Don't forget to mention the language you're using, and mark as having spoiler if you include your solution.
-
No Label
- Cancel
Commenting is not allowed on this discussion
You cannot view this solution
There is no solution to show
Please sign in or sign up to leave a comment.
Multiple issues should be addressed before this collects unnecessarily many downvotes.
All the issues should be resolved. Let me know if I missed anything.
No, should be good now as far as I can tell.
Time to republish.
These things get retired fast
0
,''
,[]
, ...)map
andid
are builtin functions, hiding builtins is bad practiceYou 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. )
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
.map
->fmap
&id
->identity