News for hackers. Stuff that matters.
Re:Why F#? by malakai521 on Tuesday April 01, 2025 @11:06AM (#43547687)
`var post = await _postService.getById(id);`

the F# equivalent is

`let! post = _postService.getById id`

Re:Why F#? by alternatex on Tuesday April 01, 2025 @01:08PM (#43549167)
You're missing the task {} block
Re:Why F#? by neonsunset on Tuesday April 01, 2025 @01:35PM (#43549495)
This assumes the context is already a task computation expression, which is what you'd have in asynchronous code.
Re:Why F#? by sWW26 on Wednesday April 02, 2025 @05:01AM (#43554862)
and the C# is missing the `async Task` boilerplate