Re: shootout: implementing an interpreter

Liste des GroupesRevenir à cl scheme 
Sujet : Re: shootout: implementing an interpreter
De : Nobody447095 (at) *nospam* here-nor-there.org (B. Pym)
Groupes : comp.lang.lisp comp.lang.scheme
Date : 08. Sep 2024, 07:09:49
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vbjbio$1qof8$1@dont-email.me>
User-Agent : XanaNews/1.18.1.6
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 (,,,)

Scheme

(map list '[2 3 4] '[20 30 40] '[200 300 400] '[2000 3000 4000])
  ===>
((2 20 200 2000) (3 30 300 3000) (4 40 400 4000))

Date Sujet#  Auteur
8 Sep 24 o Re: shootout: implementing an interpreter1B. Pym

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal