[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Testing job applicants
In alt.folklore.computers Stephen R. van den Berg <srb@cuci.nl> wrote:
> I think it's called "Miranda". If I recall correctly, it's some kind
> of Pascal++.
Only if you consider stuff like
concat xss = [x | xs<-xss; x<-xs]
for joining a list of lists into a single list, or this function to
apply a given function to every member of a list
map f xs = [f x | x<-xs]
to be Pascal-like ;-)
Or how about this one:
sieve [] = []
sieve (n:ns) = n : sieve [m | m<-ns; m mod n ~= 0]
which can be used to define the infinite list of all primes:
primes = sieve [2..]
Miranda and its more mature sibling Haskell are great fun playing
around with.
-Torsten