# Interface lcon 2

**URL:** <https://discuss.ocaml.org/t/interface-lcon-2/1763>\
**Category:** Learning\
**Created:** [March 23, 2018, 3:01pm UTC](https://discuss.ocaml.org/t/interface-lcon-2/1763 "2018-03-23T15:01:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![herosgogo](https://avatars.discourse-cdn.com/v4/letter/h/3ec8ea/32.png) [@herosgogo](https://discuss.ocaml.org/u/herosgogo)\
**Post date:** [March 23, 2018, 3:01pm UTC](https://discuss.ocaml.org/t/interface-lcon-2/1763/1 "2018-03-23T15:01:07Z")

</div>

Hi everyone,  
I have an interface Lcon that is used for creating a dictionnary:

module M = struct  
include Map.Make (Char)

let to\_iter s =  
fun k -\>  
iter (fun key item -\> k (key, item)) s  
end

type t = {  
eow : bool;  
words : t M.t;  
}

let empty = {  
eow = false;  
words = M.empty  
}

Now I want to create a function that is for adding a word in the dictionnary:  
add word lexicon  
val add : string -\> t -\> t

How can I do this function?

Thank you in advance

---

<div class="post-metadata">

**Author:** ![thizanne](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/thizanne/32/764_2.png) [@thizanne](https://discuss.ocaml.org/u/thizanne)\
**Post date:** [March 23, 2018, 3:25pm UTC](https://discuss.ocaml.org/t/interface-lcon-2/1763/2 "2018-03-23T15:25:44Z")

</div>

To people answering: please don’t write the full function, it’s a home assignment.

To herosgogo, asking for help is accepted, although I would have appreciated, as your TA, that you did not go on a public forum hoping that someone would do the work for you.
