Is it possible to have a Ocaml function that accepts only integer lists?
- by Sam
I'm writing a recursive function in Ocaml that's supposed to count the number of items in an integer list (Yes I know there's a List.length function but I'm trying to do it myself). However the Ocaml compiler/interpreter forces me to use alpha list all the time.
So is it wrong to say that, when a function accepts a list as a parameter, the type…