Comments (5)
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.
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.
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.
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.
@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)
- TheBackwardPipeOperatorCanAlsoHelpWithGrouping - Add De-Emphasis Note?
- [FSharpKoans](https://github.com/ChrisMarinos/FSharpKoans/codespaces) not working HOT 1
- Can't build with newer version of .net HOT 1
- OrTheyMightNot AssertThrows vsdbg exception
- Discussion: possible move to fsprojects HOT 1
- .net core / .net standard support
- Getting started with F# and Ionide HOT 2
- VS 2017 'Could not load file or assembly 'FSharp.Core, Version=4.4.1.0 HOT 4
- Running Koans on OS X command line HOT 3
- Getting started in VS 2017 HOT 2
- typo in AboutPipelining.fs HOT 1
- .NET Core support HOT 1
- Incoherent error message in the 4th "koan" HOT 2
- Warnings relating to "Microsoft.DotNet.Watcher.Tools" when running Koans
- Idea: Extend Koans to Include Type Providers HOT 4
- Lightweight alternative to Ionide
- Question about Koan 14 - DotNetCollections HOT 3
- Koan 15 (stock data): Wrong assertion HOT 2
- Running NUnit Tests - Issue
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fsharpkoans.