Sample Code
The following Miranda script determines the set of all subsets of a set of numbers
subsets = ] subsets (x:xs) = ++ y | y <- ys] ++ ys where ys = subsets xsand this is a literate script for a function primes
which gives the list of all prime numbers
Read more about this topic: Miranda (programming Language)
Famous quotes containing the words sample and/or code:
“The present war having so long cut off all communication with Great-Britain, we are not able to make a fair estimate of the state of science in that country. The spirit in which she wages war is the only sample before our eyes, and that does not seem the legitimate offspring either of science or of civilization.”
—Thomas Jefferson (17431826)
“...I had grown up in a world that was dominated by immature age. Not by vigorous immaturity, but by immaturity that was old and tired and prudent, that loved ritual and rubric, and was utterly wanting in curiosity about the new and the strange. Its era has passed away, and the world it made has crumbled around us. Its finest creation, a code of manners, has been ridiculed and discarded.”
—Ellen Glasgow (18731945)