[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.lisp

Re: Lisp is a Write-Only like Perl or Forth

William James

12/30/2015 6:42:00 PM

D. Herring wrote:

> Alternatively, how could (map #'f a b) be extended to take two entries
> from the A for each entry from B, so we can call (f A1 A2 B) or (f A1
> B A2)?

MatzLisp (Ruby):

a = (0..9)
b = (50..54)

a.each_slice(2).zip(b).map{|(a1,a2),b| "#{a1} #{a2} #{b}"}
===>
["0 1 50", "2 3 51", "4 5 52", "6 7 53", "8 9 54"]


--
Amazon bans book. After nearly a month on the site, all traces of the book and
its 80 reviews have been removed.
http://jamesfetzer.blogspot.com/2015/11/debunking-sandy-hook-debunk...
https://www.youtube.com/watch?v=E...
2 Answers

Bigos

12/30/2015 7:44:00 PM

0

On 30/12/15 18:42, WJ wrote:
> D. Herring wrote:
>
>> Alternatively, how could (map #'f a b) be extended to take two entries
>> from the A for each entry from B, so we can call (f A1 A2 B) or (f A1
>> B A2)?
>
> MatzLisp (Ruby):
>
> a = (0..9)
> b = (50..54)
>
> a.each_slice(2).zip(b).map{|(a1,a2),b| "#{a1} #{a2} #{b}"}
> ===>
> ["0 1 50", "2 3 51", "4 5 52", "6 7 53", "8 9 54"]
>
>

Lisp is write-only?

You haven't seen Ruby someone I know wrote.

Barry Margolin

12/30/2015 8:16:00 PM

0

In article <n61c65$cqh$1@speranza.aioe.org>,
Bigos <ruby.object@googlemail.com> wrote:

> On 30/12/15 18:42, WJ wrote:
> > D. Herring wrote:
> >
> >> Alternatively, how could (map #'f a b) be extended to take two entries
> >> from the A for each entry from B, so we can call (f A1 A2 B) or (f A1
> >> B A2)?
> >
> > MatzLisp (Ruby):
> >
> > a = (0..9)
> > b = (50..54)
> >
> > a.each_slice(2).zip(b).map{|(a1,a2),b| "#{a1} #{a2} #{b}"}
> > ===>
> > ["0 1 50", "2 3 51", "4 5 52", "6 7 53", "8 9 54"]
> >
> >
>
> Lisp is write-only?
>
> You haven't seen Ruby someone I know wrote.

DNFTT

--
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***