Skip to content
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

F# example? #8

Open
ImaginaryDevelopment opened this issue Jun 10, 2016 · 1 comment
Open

F# example? #8

ImaginaryDevelopment opened this issue Jun 10, 2016 · 1 comment

Comments

@ImaginaryDevelopment
Copy link

any chance you'd be interested in doing this in F# also? It seems there's a lot of code that on the surface (I have zero experience, but guessing) that a lot of the code is completely unnecessary with F#.

For example based on my understanding of Cqrs as it would be used in F#, you could define the aggregate type as follows:

type Aggregate<'t> = {Id:Guid;EventsLoaded:int; Data:'t;}
    with member x.ApplyEvent(fEvent) : Aggregate<'t> * _ list = fEvent x |> (fun (a,events) -> {a with EventsLoaded = Seq.length events + a.EventsLoaded},events)

pardon my intrusion if you aren't into F#, but if you are, I'd love feedback on my interpretation and attempt at application of your example into my preferred language.

@jchannon
Copy link
Contributor

jchannon commented Oct 5, 2020

@ImaginaryDevelopment bit late but I'd like to see that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants