From: Fedir Koshovyy
Subject: using setq
Date: Sun, 26 Jan 2003 13:48:05 +0000
Message-ID: <l0p73vkk1o96tpgnhqjt1k3vnq1520c71a@4ax.com> ����� ��� ��������� � ������ �������.
����� 2 ��� ���� ���� � cons ����������� ������� greet.
������� ������� � ������� ���:
(defun greet (name)
(cons 'hello name))
����� ������� � ����� �����������������, ����� ������ name ������ ��
������ � ������, �� ������� ���������� �� ���������� ������:
(defun greet (name)
(if (symbolp name)
(setq name (cons name nil)))
(cons 'hello name))
��� ��������, �� ������ � ������������� setq. ��������� �� � ���
��������? ��� ����� ������ �� �������.
������� ����������. From: Ivan Boldyrev
Subject: Re: using setq
Date: Sun, 26 Jan 2003 14:21:47 +0000
Message-ID: <m3fzrgq9dw.fsf@localhost.localdomain> Fedir Koshovyy <··@kmc.kiev.ua> writes:
> ����� ��� ��������� � ������ �������.
> ����� 2 ��� ���� ���� � cons ����������� ������� greet.
Speak English! Or use fido7.ru.lisp group.
> ������� ������� � ������� ���:
>
> (defun greet (name)
> (cons 'hello name))
> ����� ������� � ����� �����������������, ����� ������ name ������ ��
> ������ � ������, �� ������� ���������� �� ���������� ������:
>
> (defun greet (name)
> (if (symbolp name)
> (setq name (cons name nil)))
> (cons 'hello name))
> ��� ��������, �� ������ � ������������� setq. ��������� �� � ���
> ��������? ��� ����� ������ �� �������.
(defun greet (name)
(cons
'hello
(if (symbolp name)
(cons name nil)
name)))
setq sucks :)
--
Ivan Boldyrev
PGP fp: 3640 E637 EE3D AA51 A59F 3306 A5BD D198 5609 8673
Violets are red, Roses are blue. //
I'm schizophrenic, And so am I.
Remove .microsoft.com from my mail address. From: Fedir Koshovyy
Subject: Re: using setq
Date: Sun, 26 Jan 2003 15:33:37 +0000
Message-ID: <qgu73vchack3pee79otah29aapb5s9v46p@4ax.com> On 26 Jan 2003 20:21:47 +0600, Ivan Boldyrev
<········@uiggm.nsc.ru.microsoft.com> wrote:
>Fedir Koshovyy <··@kmc.kiev.ua> writes:
>Speak English! Or use fido7.ru.lisp group.
Excuse me! I have intatntion to post to fido7.ru.lisp , but by mistake
click on another.
>(defun greet (name)
> (cons
> 'hello
> (if (symbolp name)
> (cons name nil)
> name)))
Thanks, it's so simple! Just move if expression into cons.
>setq sucks :)