5 ms·
It doesn't look so bad to me. It's telling you that a list type was expected but you passed it a function that returns a list instead. You're right though tha
by tgflynn 4y ago
It doesn't look so bad to me. It's telling you that a list type was expected but you passed it a function that returns a list instead.
You're right though that OCaml isn't the kind of language you can pick up in an afternoon.
- imajoredinecon 4y agoTiny quibble that I wouldn’t normally post but I think illustrates the readability issues here: Should that be “Result set type was expected”, not “list”?
- tgflynn 4y agoNo, I think this: Result_set.t list means a list whose items are of type Result_set.t. Also I think the notation X.t is idiomatic for a type defined by module X.
- whimsicalism 4y agoRegardless the function does not return a list.
- tgflynn 4y agoIt looks like I missed a parenthesis.
- thingification 4y agoCan you explain (rather than state) what readability issue you think exists here? I don't know if you see a real readability issue or not, but I do think it's easy to jump to "hard to read" when that's only true in a certain parochial sense: it's not what we're used to.
- whimsicalism 4y ago> you passed it a function that returns a list instead I don't know OCaml really, but I would read that intuitively as a list of (functions that return Result_set.t), which is not compatible with a list of Result_set.t.