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
Try this:
type trie<'k,'a when 'k : comparison> = TNode of ('a option * Map<'k,trie<'k,'a>>)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With