0

I'm looking for a way to execute as string in sml. For example:

val evalResult = eval "1 + 1";
> val it = 2 : int

I can't actual believe that I didn't find any resource on this topic...

Any help is appreciated.

scheffield
  • 6,618
  • 2
  • 30
  • 31

1 Answers1

6

Short answer: SML, like most typed languages, does not have any eval. And although that would not be impossible, its absence is usually considered a feature. ;)

Andreas Rossberg
  • 34,518
  • 3
  • 61
  • 72