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)
“Many people will say to working mothers, in effect, I dont think you can have it all. The phrase for have it all is code for have your cake and eat it too. What these people really mean is that achievement in the workplace has always come at a priceusually a significant personal price; conversely, women who stayed home with their children were seen as having sacrificed a great deal of their own ambition for their families.”
—Anne C. Weisberg (20th century)