fsprojects / fsharp-cheatsheet

This cheatsheet aims to succinctly cover the most important aspects of F# 6.0.
http://fsprojects.github.io/fsharp-cheatsheet/
Other
324 stars 60 forks source link

Feat:Code Organization #25

Closed SpiralOSS closed 8 months ago

SpiralOSS commented 8 months ago

Attempt at Code Organization section.

SpiralOSS commented 8 months ago

I didn't bother with the do in modules because of how oddly it behaves (https://github.com/dotnet/fsharp/issues/13905); unless, @bartelink, you have a good example (?). Interested in your input either way.

bartelink commented 8 months ago

Yes, I agree it's ultra niche and not imprtant. It can be shown in the context of a type anyway.

For that, one might contrast

  1. a public primary ctor with 3 args that composes two via a let and then does something with the third via a do
  2. a private primary ctor that takes one arg, with a 3 arg new() that delegates to it and does the do bit before delegating

Something should show that assembly level attributes get attached to a do() statement though.

(Will review in a bit)

SpiralOSS commented 8 months ago

Appears, I was hasty on that merge button. Will review this morning.