Reputation: 11
I'm trying to make a function with arguments a and bs, that will check if list bs contains a product whos first element is a. If list bs contains a product whos first element is a, then that product is returned.
The function is giving a nondescriptive error relating to a file "evalloop.sml".
fun matchFirstElement ([], _) = ("V70",["2.4T","V70a1"],(20,25),"MT1") |
matchFirstElement (b::bs, a) = if (a = #1 b) then b else getProdRule(bs, a);
Upvotes: 1
Views: 300