Autrijus Tang interviewed by Perl.com
metaperl posted about this on the Haskell Sequence this morning and I thought all of you list readers might be interested as well. Autrijus Tang is well-known for developing the first working Perl 6 interpreter, Pugs. Pugs is written in Haskell. Perl.com has an interview with Autrijus, and page 2 of that interview gets particularly interesting. URL: http://www.perl.com/pub/a/2005/09/08/autrijus-tang.html?page=2 Favorite quote: "Haskell . . . is faster than C++, more concise than Perl, more regular than Python, more flexible than Ruby, more typeful than C#, more robust than Java, and has absolutely nothing in common with PHP." -- John
What is the meaning of xxs@(x:xs) in the code below? I understand that x:xs is a list /head:tail/ but a tuple of (x:xs) does not make sense. main = print (take 1000 hamming) hamming = 1 : map (2*) hamming ~~ map (3*) hamming ~~ map (5*) hamming where xxs@(x:xs) ~~ yys@(y:ys) -- To merge two streams: | x==y = (x : xs~~ys) -- if the heads are common, take that | x<y = (x : xs~~yys) -- otherwise, take the smaller one | x>y = (y : xxs~~ys) -- and proceed to merge the rest Thanks, Joel
On Thu, 15 Sep 2005, Joel Reymont wrote:
What is the meaning of xxs@(x:xs) in the code below?
I understand that x:xs is a list /head:tail/ but a tuple of (x:xs) does not make sense.
It's not a tuple, it's just the usual meaning for parens. -- flippa@flippac.org The task of the academic is not to scale great intellectual mountains, but to flatten them.
participants (3)
-
Joel Reymont -
John Goerzen -
Philippa Cowderoy