From 254508d12aacf373bea5c9a8acede30340c73eb3 Mon Sep 17 00:00:00 2001 From: Cuihtlauac ALVARADO Date: Wed, 17 Jan 2024 16:30:17 +0100 Subject: [PATCH] Start --- .devcontainer/Dockerfile | 2 +- README.md | 9 +++++++++ task.ml | 11 +++-------- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index d7c5b03..9ad5135 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,3 +1,3 @@ FROM ocaml/opam RUN opam update -RUN opam install -y dune merlin ocamlformat utop ocaml-lsp-server +RUN opam install -y dune merlin ocamlformat utop ocaml-lsp-server ounit2 diff --git a/README.md b/README.md index e258a4c..d8aaf6d 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,12 @@ +### Get Started + +Click the green “Code” button, select the “Codespaces” tab, and create your own. Not too long after, you should be in VS Code inside your browser. Go to the “TERMINAL” tab, extend it and run `dune test`. Tests shoud fail, this is normal. + + +Open the files `task.ml` and `task.mli`. +* `task.mli` contains the description of what you should do. +* `task.ml` - write your code here + ### Docs ```shell diff --git a/task.ml b/task.ml index 8b332ef..214fe2a 100644 --- a/task.ml +++ b/task.ml @@ -1,10 +1,5 @@ -let ignore _ = () +let [@warning "-27"] ignore x = failwith "Not yet implemented" -let map f u = - let rec loop acc = function - | [] -> acc - | x :: u -> loop (f x :: acc) u in - List.rev (loop [] u) +let [@warning "-27"] map f u = failwith "Not yet implemented" -let range lo = - let rec loop u i = if i < lo then u else loop (i :: u) (i - 1) in loop [] \ No newline at end of file +let [@warning "-27"] range lo hi = failwith "Not yet implemented"