Giter VIP home page Giter VIP logo

Comments (5)

sambeckingham avatar sambeckingham commented on July 2, 2024 1

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 AboutOperators.fs because people from outside of the dotnet ecosystem might not be aware that you can override or implement your own operators, which is useful to know with F# as frameworks like Suave have their own operators like >=>.

from fsharpkoans.

ChrisMarinos avatar ChrisMarinos commented on July 2, 2024

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?

from fsharpkoans.

KingKnecht avatar KingKnecht commented on July 2, 2024

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 most newbies will not even recognize the miracle. They see x and f get reversed, oh cool, that explains it. But if you really think about it, it explains nothing.

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 (+)? Used as infix and prefix operator?

from fsharpkoans.

KingKnecht avatar KingKnecht commented on July 2, 2024

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.

from fsharpkoans.

vilinski avatar vilinski commented on July 2, 2024

@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.

from fsharpkoans.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.