Rocksolid Light

News from da outaworlds

mail  files  register  groups  login

Message-ID:  

You prefer the company of the opposite sex, but are well liked by your own.


comp / comp.lang.lisp / Re: Functional programming

SubjectAuthor
o Re: Functional programmingB. Pym

1
Subject: Re: Functional programming
From: B. Pym
Newsgroups: comp.lang.lisp, comp.lang.scheme
Organization: A noiseless patient Spider
Date: Wed, 18 Sep 2024 01:34 UTC
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Nobody447095@here-nor-there.org (B. Pym)
Newsgroups: comp.lang.lisp,comp.lang.scheme
Subject: Re: Functional programming
Date: Wed, 18 Sep 2024 01:34:05 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 38
Message-ID: <vcdamc$3p5os$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Injection-Date: Wed, 18 Sep 2024 03:34:06 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="37c9476df3a50cad9ce61661ae32308b";
logging-data="3970844"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19bkW7GNw8TDBHnF9FNPW9B"
User-Agent: XanaNews/1.18.1.6
Cancel-Lock: sha1:FVIap/hSYnNG6LxYAqpycrLMat4=
View all headers

Erik Naggum wrote:

> I also happen to do (apply #'funcall <list>) at times. I guess Scheme's
> (apply (eval (car list)) (cdr list)) is much more _elegant_. hee hee!

(define seq (list + 2 3 4))

(apply (car seq) (cdr seq))

===>
9

Gauche Scheme:

(define seq (list + 2 3 4))

((apply pa$ seq))
===>
9

(eval seq #f)
===>
9

Racket:

(define seq (list + 2 3 4))

((apply curry seq))
===>
9

(eval seq)
===>
9

1

rocksolid light 0.9.8
clearnet tor