Python syntax in Lisp and Scheme
Hartmann Schaffer
hs at heaven.nirvananet
Tue Oct 14 12:41:54 EDT 2003
In article <q-KdncVZlO2AgxGiU-KYgw at comcast.com>,
"Terry Reedy" <tjreedy at udel.edu> writes:
>
> <prunesquallor at comcast.net> wrote in message
> news:8yno1dvi.fsf at comcast.net...
>> I disagree. This:
>>
>> (map 'list (lambda (x) (+ x offset)) some-list)
>>
>> is clearer than this:
>>
>> (flet ((add-offset (x) (+ x offset)))
>> (map 'list #'add-offset some-list))
>
> I agree for this example (and for the Python equivalent). But if the
> function definition is several lines, then I prefer to have it defined
> first so that the map remains a mind-bite-sized chunk.
i agree with your evaluation of what is preferrablem but i think you
would be surprised how clear the amove construct can look when
properly indented (something a decent editor would do automatically)
hs
--
ceterum censeo SCO esse delendam
More information about the Python-list
mailing list