Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

:Re: value not reinitialized on subsequent function calls

7 views
Skip to first unread message

Robert L.

unread,
Nov 29, 2016, 4:45:42 AM11/29/16
to
Kenneth Tilton wrote:

> > You need to have some sort of list copy on base-counts
> > to protect the data from the destructive modification.
> >
> > e.g.,
> > (let ((base-counts (list (list 'a 0) (list 'c 0) (list 'g 0) (list t 0)))
>
> or:
>
> (let ((base-counts (loop for base in '(a c g tee)
> collecting (list base 0))))...
>
> Not that 't is not a nice symbol. I don't know, maybe there would be no
> ill consequences. Well, if you forget to quote the other three there
> would likely be a compiler warning, but t would not.
>
> btw, if loop seems too advanced:
>
> (mapcar (lambda (base) (list base 0))
> '(a c g tee))

MatzLisp (Ruby):

[:a,:c,:g,:t].zip([0].cycle)
===>
[[:a, 0], [:c, 0], [:g, 0], [:t, 0]]


--
General Mills ... aired a television commercial for ... Cheerios ... promoting
Aryan hybridization with blacks (depicting, as usual, a white woman and a black
man). ... The ad agency responsible for the campaign was ... [Jewish] Saatchi &
Saatchi.... www.counter-currents.com/2013/08/behind-anti-white-advertising
0 new messages