-
Notifications
You must be signed in to change notification settings - Fork 672
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HowThePipeOperatorIsDefined #93
Comments
Hmmm, that's a good point. On one hand, I think it's actually great that you spent 30 minutes thinking about the the black magic since the goal of the koans is to spur that sort of thinking. However, I can also see where it might feel like you're lacking the information to tie all the pieces together. I'm good with adding a note about the infix if you think it would be helpful. However, I'm curious- did the 30 minutes feel more like you were wrapping your head around a new concept, or did it more feel like you were cheated when you figured out the infix part? |
Because I already read about currying I read about that again, in hope this would solve the problem. But no, couldn't see how that could help me. Then I googled operators, because the title of the koan is "HowThePipeOperatorIsDefined". Didn't want to google Pipe directly .Then I stumbled upon infix operators. Tataa, there it was. Gave me mixed feelings. Happy to understand why it works, a bit angry because it's trivial if you know about the special behavior. I think (custom) infix-operators are a big thing in F# and worth to be mentioned in the koan. How to force people to recognize the problem, I don't know. Maybe a koan about |
Thinking more about it: The definition of the pipe-operator given in the example is not the point why it works. If the koan should explain why it works, the infix-stuff is mandatory. |
@KingKnecht can you elaborate a short helpful note, explaining it to you in the way you understand it now? If yes - don't hesitate to make a PR or write a comment. |
Just ran through the Koans myself and didn't even clock the infix/prefix definition part. Went back and looked after reading this issue. We could probably create an |
Would be nice to tell newbies, that F# will make an Infix-operator out of
(|>)
. I was thinking ~30min about the black magic that is going on with the given definition:How can
x
(the list in the example) ever be on the left side of the function|>
?The text was updated successfully, but these errors were encountered: