ijaz
ijaz

Reputation: 11

how can we evaluate Char functions on SML?

How can we evaluate Char functions in SML, like:

succ #"A"; should give me B, right?

But it gives me the error "unbound value identifier : succ"

Upvotes: 1

Views: 68

Answers (1)

Emil Vikström
Emil Vikström

Reputation: 91983

You have to load the Char library to use its functions. Either load it into the global scope:

open Char;
succ #"A";

Or call the function with the library name prepended:

Char.succ #"A";

Upvotes: 3

Related Questions