SML

Comments Off on SML

A blast from the past!

Here is the classic “Hello World” program written in Standard ML (SML):

fun hello () = print ("Hello, World!\n")

hello ()

Let me explain what’s going on:

  • fun is a keyword that introduces a function definition.
  • hello is the name of the function. In SML, functions are first-class citizens and can be passed around like values.
  • () is the function signature, indicating that hello takes no arguments (i.e., it’s a zero-argument function).
  • print is a built-in function that prints its argument to the standard output.
  • "Hello, World!\n" is the string we want to print. The \n at the end is a newline character.

The last two lines simply call the hello function with no arguments, which executes the code inside it and prints “Hello, World!” to the console.

That’s it! A simple but elegant program in SML.

Prompt
young woman, beautiful face, standing, great body, gorgeous figure, long legs, pretty eyes, long hair, learns SML programming language, beautiful background, magnificent scenery, Roy Hamilton style, HD, sharp focus, stunningly beautiful, breathtaking, award-winning, professional, highly detailed

Negative prompt
ugly, deformed, noisy, blurry, distorted, grainy, extra eyes, bad eyes, ugly eyes, imperfect eyes, deformed pupils, deformed iris, cross-eyed, poorly drawn face, bad face, fused face, ugly face, worst face, unrealistic skin texture, out of frame, poorly drawn hands, cloned face, double face, blurry, bad quality

Text model: llama3

Image model: EventHorizonPictoXL