The Miranda Programming Language
Free
resources updated everyday:
XXXLINKSXX
Miranda was developed in 1985-86 by David Turner, and is now currently being marketed by Research Software Ltd. of England. Miranda was the successor of the functional languages SASL and KRC. With Miranda, the main goal was to produce a commercial version of a standard non-strict purely functional language.
To make Miranda commercially viable, the development environment had to be made very flexible and easy-to-use.
Significant Language Features
Miranda- A Non-Strict Purely Functional Language
- Non-Strict:
In Non-Strict functional languages, the arguments to a function are not evaluated until they are actually required within the functions being called. Therefore, any parameter can be passed to a function and until it is needed in that function, this parameter is not evaluated.
This is also known as lazy evaluation, and the main advantage of using this method is that it allows for passing infinite element data structures to a function.
- Purely Functional:
Pure functional languages perform all computation using function application. "Side-effect" features such as destructive assignments and looping are not even provided within the language, and therefore all programs have to strictly adhere to the functional approach of programming.
Characteristics of Functional Languages
Sample Program
Source Code: (QuickSort)
sort [] = []
sort (a:x) = sort [ b | b <- x; b <= a ]
++ [a] ++
sort [ b | b <- x; b > a ]
Due to the unavailability of a Miranda compiler, an executable program is not available.
This example implements QuickSort using Miranda.