Tim
Tim

Reputation: 99428

Is a declaration an expression in SML?

In SML, is a declaration (val-declaration, type declaration, ...)

Upvotes: 1

Views: 96

Answers (1)

Andreas Rossberg
Andreas Rossberg

Reputation: 36098

A declaration is just that, a declaration, its own syntactic class. The only way to embed into an expression is via the expression form let dec in exp end.

Technically, there are no statements in ML.

Upvotes: 3

Related Questions