fsprojects / fsprojects/FSharpx.Collections
Code style guidance for new structure
Nobody has claimed this yet.
- Dominant language
- F#
- Stars
- 253
- Forks
- 76
- Avg merge
- 49m
- Merged PRs (30d)
- 1
Description
Hi there.
I'm working on a functional AA tree, hoping to add it to this repository once tested, but I ran into a problem related to code style when implementing the IEnumerable interface.
Here is the file: https://github.com/hummy123/Functional-AA-Tree/blob/main/src/AaTree.fs .
The type at the top uses the module's (which comes after the type) toList function, which is enabled by the recursive namespace at the top.
However, this isn't best practice I feel (I like the "onion architecture" style where no piece at the top depends on any code written below), but the other choice I had was to code toList manually without using the fold function defined in the module, which I didn't like either.
I would have liked to add the toList definition and the namespaces at the end of the file where "type AaTree with..." is, but then I get a compile error FS0909 because an interface must be implemented at the start of the type definition. So I'm not sure what to do to contribute in a way that fits this repositories code style (haven't seen "namespace rec" on other files here).
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with src/AaTree.fs, focusing on the AaTree type, its IEnumerable implementation, the recursive namespace, and the module's toList and fold functions. Review the existing project structure for comparable patterns; done means a maintainer-approved approach that compiles and fits the repository's code style.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- fsharp
- Domain
- developer-experience
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100