In the documentation in mentions that String is just an alias for [Char],
but it doesn't seem to let me use any list functions on a string.

For example, attempting "dropWhile" fails with:
links> dropWhile(fun(x){x=='h'}, "hello");
<stdin>:1: Type error: The function
    `dropWhile'
has type
    `((Char) ~a~> Bool, [Char]) ~a~> [Char]'
while the arguments passed to it have types
    `(Char) ~> Bool'
and
    `String'
and the currently allowed effects are
    `wild|_'.
In expression: dropWhile(fun(x){x=='h'}, "hello").

Using yesterday's SVN build on OCaml 3.12.0.

-Leif Warner
_______________________________________________
links-users mailing list
[email protected]
http://lists.inf.ed.ac.uk/mailman/listinfo/links-users

Reply via email to