Tracy Jackson
Tracy Jackson

Reputation: 21

How to define a constant in SML in a let binding way?

Is there a way to define a constant in SML in a let binding way. So basically what I'm asking is how to for example do constant x = 5, in the way below:

let
   ....
in
   ...
end

Upvotes: 0

Views: 273

Answers (1)

Andreas Rossberg
Andreas Rossberg

Reputation: 36088

Not sure I understand the question correctly, but

let val x = 5 in ... end

sounds like it did what you're asking for.

Upvotes: 5

Related Questions