Lazy ML
Encyclopedia
Lazy ML is a functional programming language
Programming language
A programming language is an artificial language designed to communicate instructions to a machine, particularly a computer. Programming languages can be used to create programs that control the behavior of a machine and/or to express algorithms precisely....

 developed in the early 1980s by Lennart Augustsson
Lennart Augustsson
Lennart Augustsson is a Swedish computer scientist. He was previously a lecturer at the Computing Science Department at Chalmers University of Technology...

 and Thomas Johnsson at Chalmers University of Technology
Chalmers University of Technology
Chalmers University of Technology , is a Swedish university located in Gothenburg that focuses on research and education in technology, natural science and architecture.-History:...

, prior to Miranda
Miranda programming language
Miranda is a non-strict purely functional programming language designed by David Turner as a successor to his earlier programming languages SASL and KRC, using some concepts from ML and Hope. It was produced by Research Software Ltd...

 and Haskell
Haskell (programming language)
Haskell is a standardized, general-purpose purely functional programming language, with non-strict semantics and strong static typing. It is named after logician Haskell Curry. In Haskell, "a function is a first-class citizen" of the programming language. As a functional programming language, the...

. LML is a strongly typed, statically scoped implementation of ML, with lazy evaluation
Lazy evaluation
In programming language theory, lazy evaluation or call-by-need is an evaluation strategy which delays the evaluation of an expression until the value of this is actually required and which also avoids repeated evaluations...

.

The key innovation of LML was to demonstrate how to compile a lazy functional language. Until then, lazy languages had been implemented via interpreted graph reduction. LML compiled to G-machine code.

LML is also notable as the language in which HBC, the Haskell B Compiler, was implemented.

Example programs

Hello, world:

"hello world\n"

Factorial,

let rec fact 0 = 1 ||
fact n = n*fact(n-1)

External links

  • Lazy ML (LML) Examples
  • A Compiler for Lazy ML, Lennart Augustsson
    Lennart Augustsson
    Lennart Augustsson is a Swedish computer scientist. He was previously a lecturer at the Computing Science Department at Chalmers University of Technology...

    , Proceedings of the 1984 ACM Symposium on LISP and functional programming, 1984.
The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK