Skip to content
Snippets Groups Projects
Commit 463e719e authored by erwan's avatar erwan
Browse files

test: use State.t instead of 'st intest/skeleton/ to ease the life of Ocaml beginners

parent 2fc9023a
No related branches found
No related tags found
No related merge requests found
(* Time-stamp: <modified the 16/01/2023 (at 21:58) by Erwan Jahier> *)
(* Time-stamp: <modified the 29/06/2023 (at 16:04) by Erwan Jahier> *)
(* a dumb algo that compiles *)
open Algo
let (init_state: int -> string -> 'st) =
let (init_state: int -> string -> State.t) =
fun _nl _ -> (Random.int 10)
let (enable_f: 'st -> 'st neighbor list -> action list) =
let (enable_f: State.t -> State.t neighbor list -> action list) =
fun _ nl ->
match state (List.hd nl) with
| 0 -> ["action2"]
......@@ -16,7 +16,7 @@ let (enable_f: 'st -> 'st neighbor list -> action list) =
| _ -> ["action1"]
let (step_f : 'st -> 'st neighbor list -> action -> 'st ) =
let (step_f : State.t -> State.t neighbor list -> action -> State.t ) =
fun e _ ->
function
| "action1" -> 0
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment