Recursiont icon indicating copy to clipboard operation
Recursiont copied to clipboard

Add an F# API.

Open teo-tsirpanis opened this issue 1 year ago • 3 comments

Investigate if we can create an F# API on top of Recursion't and implement it.

The API will be a recursive computation expression and will take advantage of the resumable state machines feature. It will be distributed as a source file inside the main Recursiont package.

teo-tsirpanis avatar Jan 07 '24 22:01 teo-tsirpanis

Doesn't F# already have proper Tail Call Optimization? Wouldn't this just be a slower version of that, or am I missing something.

ITR13 avatar Jan 09 '24 15:01 ITR13

Tail call optimization happens only when the recursive call is the last thing that happens before returning. Recursion't primarily caters to non-tail-recursive algorithms.

teo-tsirpanis avatar Jan 09 '24 16:01 teo-tsirpanis

@teo-tsirpanis if this gets implemented, we could mention Recursiont in the error message for this upcoming FSharpLint rule: https://github.com/fsprojects/FSharpLint/pull/673 (and maybe rename it from EnsureTailCallDiagnosticsInRecursiveFunctions to EnsureNoStackoverflowsInRecursiveFunctions ).

knocte avatar Jan 31 '24 07:01 knocte