blob: 331ed1ad8393ba428169d49f94a2cf184b85adc4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
open StdLabels
module T = Sounds
(** Mute the last consonant if there is no voyel in the syllabus.
This modifier is only applied in the first step, and not repeated anymore.
*)let process
: 'a Sig.modifier
= fun init ->
let (((v1, v2), c) , ending) = init in
let is_voyel = T.is_voyel v1 && T.is_voyel v2 in
match is_voyel, c with
| false, Some c ->
let c = { c with Sig.opening = List.map ~f:T.muted c.Sig.opening } in
(((v1, v2), Some c) , ending)
| _ -> init
|