From fc292a3968f4e3e861c1f939ca288e6313d9b427 Mon Sep 17 00:00:00 2001 From: Cuihtlauac Alvarado Date: Mon, 27 Nov 2023 09:03:06 +0100 Subject: [PATCH] Update data/tutorials/language/0lg_10_polymorphic_variants.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Reynir Björnsson --- data/tutorials/language/0lg_10_polymorphic_variants.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/data/tutorials/language/0lg_10_polymorphic_variants.md b/data/tutorials/language/0lg_10_polymorphic_variants.md index 02cb9acfb2..f828786b44 100644 --- a/data/tutorials/language/0lg_10_polymorphic_variants.md +++ b/data/tutorials/language/0lg_10_polymorphic_variants.md @@ -505,9 +505,8 @@ The [Error Handling](/docs/error-handling) guide details possible ways to handle Let's consider this exception-raising code: ```ocaml # let f_exn m n = - let open List in - let u = init m Fun.id |> map (fun n -> n * n) in - nth u n;; + let u = List.init m Fun.id |> List.map (fun n -> n * n) in + List.nth u n;; val f_exn : int -> int -> int = ```