12
votes

I have this line of code which gives the error stated in the subject line:

type trie<'k,'a> = TNode of ('a option * Map<'k,('k,'a) trie>)

I've tried inserting "when k : comparison" every possible way I can think of to no avail. I can only find examples of this using one generic parameter and not two.

Thanks in advance,

Bob

1

1 Answers

9
votes

Try this:

type trie<'k,'a when 'k : comparison> = TNode of ('a option * Map<'k,trie<'k,'a>>)