Pēcis Beisikāns' Journal
View:Personal Journal.
View:Friends.
View:Calendar.
Missed some entries? Then simply jump to the previous day or the next day.

Friday, October 13th, 2006

Time:11:58 am.
Lūk, labs Lisp sintakses tulkojums uz Pyton. Beidzot ir reāls, pamatots iemesls iebrēkties, WTF! kas par kroplīgu sintaksi tam izslavētajam Lisp!

Pašam man vislabāk patīk šī analoģija (Python gan šo sintaksi pavism nesen izdomāja):

Lisp:   (mapcar length '("one" (2 3)))      => (3 2) 
Python: [len(x) for x in ["one", [2,3]]]    => [3,2]


Hint: nosaukt "for each" par "mapcar" var tikai ļoti spēcīgs prāts.
Comments: Read 6 or Add Your Own.

Pēcis Beisikāns' Journal

View:User Info.
View:Friends.
View:Calendar.
View:Memories.
Missed some entries? Then simply jump to the previous day or the next day.