[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.lisp

Re: shootout: implementing an interpreter

William James

12/27/2015 6:35:00 AM

Frank Buss wrote:

> Looks like the Haskell syntax is not good enough, because there is Template
> Haskell and doesn't look like it is invented by people who don't know how
> to write it with higher order functions, because there are functions in the
> Haskell List package like this:
>
> -- | The 'zip4' function takes four lists and returns a list of
> -- quadruples, analogous to 'zip'.
> zip4 :: [a] -> [b] -> [c] -> [d] -> [(a,b,c,d)]
> zip4 = zipWith4 (,,,)

MatzLisp (Ruby):

[2,3,4].zip([20,30,40],[200,300,400],[2000,3000,4000])
==>[[2, 20, 200, 2000], [3, 30, 300, 3000], [4, 40, 400, 4000]]

--
Elie [Wiesel] thus could have remained at Birkenau to await the Russians.
Although his father had permission to stay with him as a hospital patient or
orderly, father and son talked it over and decided to move out with the
Germans. --- Robert Faurisson