help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to improve the readability of (any) LISP or any highlevel functi


From: LanX
Subject: Re: How to improve the readability of (any) LISP or any highlevel functional language to the level of FORTH ?
Date: Sat, 1 Jan 2011 20:04:27 -0800 (PST)
User-agent: G2/1.0

> in Perl:
>   DB<1>  my $l; print  grep { $l = $_  if  $_ ne $l } 
> (a,a,a,a,b,c,c,a,a,d,e,e,e,e);
> abcade

The same more explicit and less buggy

grep { if ($_ ne $l) { $l = $_ ; 1 } } LIST


reply via email to

[Prev in Thread] Current Thread [Next in Thread]