diff options
| author | Sébastien Dailly <sebastien@dailly.me> | 2026-06-21 09:29:20 +0200 |
|---|---|---|
| committer | Sébastien Dailly <sebastien@dailly.me> | 2026-06-21 09:29:20 +0200 |
| commit | e455d580ab4d837122a4186627ec109c4000d7c5 (patch) | |
| tree | 37e6292ae1d6a31f57e6b7cdbedf8e11e257aa5c /motus/js/reload.ml | |
| parent | 5709ce369f815ca26d555a05e84cfd0b8dc311cf (diff) | |
Diffstat (limited to 'motus/js/reload.ml')
| -rw-r--r-- | motus/js/reload.ml | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/motus/js/reload.ml b/motus/js/reload.ml index 912141d..2a12819 100644 --- a/motus/js/reload.ml +++ b/motus/js/reload.ml @@ -8,28 +8,25 @@ let process : t -> State.state -> State.state = fun () state -> (* Get the word corresponding to the proposition *) let word = - state.State.current_prop - |> List.to_seq + state.State.current_prop |> List.to_seq |> Seq.map (fun opt -> - match opt with - | None -> ' ' - | Some (letter, _) -> String.get (Jstr.to_string letter) 0 ) + match opt with + | None -> ' ' + | Some (letter, _) -> String.get (Jstr.to_string letter) 0) |> String.of_seq in let new_state = - { state with - analysis = Motus_lib.Wordlist.remove_word state.analysis word + { + state with + candidates = Motus_lib.Wordlist.remove_word state.candidates word ; catalog = Motus_lib.Wordlist.remove_word state.catalog word } in (* Get the new proposition if any *) let current_prop = - Initialize.get_proposition - ~catalog:new_state.catalog - state.length - new_state.analysis - state.rules + Initialize.get_proposition ~catalog:new_state.catalog state.length + new_state.candidates state.rules in match current_prop with | None -> new_state |
