ocaml-effects-tutorial icon indicating copy to clipboard operation
ocaml-effects-tutorial copied to clipboard

wrong type in README.md

Open Wenke-D opened this issue 1 year ago • 3 comments

in the section 1.2. Basics

The parameter k, is the delimited continuation between the point of performing the effect and the effect handler. The delimited continuation is like a dynamically defined function, that can be called and returns a value. The type of k in this case is (int, int) continuation, which says that the continuation expects an integer to continue (the first type parameter), and returns with an integer (the second type parameter).

I believe the type of k should be (int, unit) continuation instead of (int, int) continuation as the function sum_up does not return value.

Wenke-D avatar Nov 22 '23 15:11 Wenke-D