<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-13053494</id><updated>2024-09-29T08:46:06.050+03:00</updated><category term="lisp"/><category term="isikukood"/><category term="lispworks"/><category term="valideerimine"/><title type='text'>Lauri blogi</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://laurum.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13053494/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://laurum.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Lauri</name><uri>http://www.blogger.com/profile/00705740653107945481</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>2</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-13053494.post-4180620222949103573</id><published>2008-03-15T06:57:00.026+02:00</published><updated>2008-04-13T18:55:06.495+03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="isikukood"/><category scheme="http://www.blogger.com/atom/ns#" term="lisp"/><category scheme="http://www.blogger.com/atom/ns#" term="lispworks"/><category scheme="http://www.blogger.com/atom/ns#" term="valideerimine"/><title type='text'>Eesti isikukoodi valideerimine Lispis</title><content type='html'>&lt;style type=&quot;text/css&quot;&gt;.symbol { color : #770055; background-color : transparent; border: 0px; margin: 0px;}
a.symbol:link { color : #229955; background-color : transparent; text-decoration: none; border: 0px; margin: 0px; }
a.symbol:active { color : #229955; background-color : transparent; text-decoration: none; border: 0px; margin: 0px; }
a.symbol:visited { color : #229955; background-color : transparent; text-decoration: none; border: 0px; margin: 0px; }
a.symbol:hover { color : #229955; background-color : transparent; text-decoration: none; border: 0px; margin: 0px; }
.special { color : #FF5000; background-color : inherit; }
.keyword { color : #770000; background-color : inherit; }
.comment { color : #007777; background-color : inherit; }
.string { color : #777777; background-color : inherit; }
.atom { color : #314F4F; background-color : inherit; }
.macro { color : #FF5000; background-color : inherit; }
.variable { color : #36648B; background-color : inherit; }
.function { color : #8B4789; background-color : inherit; }
.attribute { color : #FF5000; background-color : inherit; }
.character { color : #0055AA; background-color : inherit; }
.syntaxerror { color : #FF0000; background-color : inherit; }
span.paren1:hover { color : inherit; background-color : #BAFFFF; }
span.paren2:hover { color : inherit; background-color : #FFCACA; }
span.paren3:hover { color : inherit; background-color : #FFFFBA; }
span.paren4:hover { color : inherit; background-color : #CACAFF; }
span.paren5:hover { color : inherit; background-color : #CAFFCA; }
span.paren6:hover { color : inherit; background-color : #FFBAFF; }

.lisp-code { background-color: white; color: black; }
.lisp-code:hover { background-color: white; color: black; }
&lt;/style&gt;
&lt;p&gt;&lt;a href=&quot;http://dukelupus.wordpress.com/&quot;&gt;Dukelupus&lt;/a&gt; &lt;a href=&quot;http://dukelupus.wordpress.com/2008/03/11/eesti-isikukoodi-valideerimine/&quot;&gt;kirjutas&lt;/a&gt; isikukoodi valideerimisest &lt;a href=&quot;http://en.wikipedia.org/wiki/.NET_Framework&quot;&gt;.NET&#39;is&lt;/a&gt;.&lt;br&gt;
Võrdluseks sama kood kirjutatuna &lt;a href=&quot;http://en.wikipedia.org/wiki/Common_Lisp&quot;&gt;Lispis&lt;/a&gt;:
&lt;p&gt;&lt;tt class=&quot;lisp-code&quot;&gt;&lt;span class=&quot;paren1&quot;&gt;(&lt;span class=&quot;lisp-code&quot;&gt;&lt;a href=&quot;http://www.lispworks.com/reference/HyperSpec/Body/m_defun.htm&quot; class=&quot;symbol&quot;&gt;&lt;i&gt;&lt;span class=&quot;symbol&quot;&gt;defun&lt;/span&gt;&lt;/i&gt;&lt;/a&gt; number-to-digits &lt;span class=&quot;paren2&quot;&gt;(&lt;span class=&quot;lisp-code&quot;&gt;&lt;a href=&quot;http://www.lispworks.com/reference/HyperSpec/Body/t_number.htm&quot; class=&quot;symbol&quot;&gt;number&lt;/a&gt;&lt;/span&gt;)&lt;/span&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;paren2&quot;&gt;(&lt;span class=&quot;lisp-code&quot;&gt;&lt;a href=&quot;http://www.lispworks.com/reference/HyperSpec/Body/f_map.htm&quot; class=&quot;symbol&quot;&gt;map&lt;/a&gt; &#39;&lt;a href=&quot;http://www.lispworks.com/reference/HyperSpec/Body/a_list.htm&quot; class=&quot;symbol&quot;&gt;list&lt;/a&gt; #&#39;&lt;a href=&quot;http://www.lispworks.com/reference/HyperSpec/Body/f_digi_1.htm&quot; class=&quot;symbol&quot;&gt;digit-char-p&lt;/a&gt; &lt;span class=&quot;paren3&quot;&gt;(&lt;span class=&quot;lisp-code&quot;&gt;&lt;a href=&quot;http://www.lispworks.com/reference/HyperSpec/Body/f_wr_to_.htm&quot; class=&quot;symbol&quot;&gt;princ-to-string&lt;/a&gt; &lt;a href=&quot;http://www.lispworks.com/reference/HyperSpec/Body/t_number.htm&quot; class=&quot;symbol&quot;&gt;number&lt;/a&gt;&lt;/span&gt;)&lt;/span&gt;&lt;/span&gt;)&lt;/span&gt;&lt;/span&gt;)&lt;/span&gt;&lt;br&gt;&lt;br&gt;

&lt;span class=&quot;paren1&quot;&gt;(&lt;span class=&quot;lisp-code&quot;&gt;&lt;a href=&quot;http://www.lispworks.com/reference/HyperSpec/Body/m_defun.htm&quot; class=&quot;symbol&quot;&gt;&lt;i&gt;&lt;span class=&quot;symbol&quot;&gt;defun&lt;/span&gt;&lt;/i&gt;&lt;/a&gt; digits-to-number &lt;span class=&quot;paren2&quot;&gt;(&lt;span class=&quot;lisp-code&quot;&gt;digits&lt;/span&gt;)&lt;/span&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;paren2&quot;&gt;(&lt;span class=&quot;lisp-code&quot;&gt;&lt;a href=&quot;http://www.lispworks.com/reference/HyperSpec/Body/f_parse_.htm&quot; class=&quot;symbol&quot;&gt;parse-integer&lt;/a&gt; &lt;span class=&quot;paren3&quot;&gt;(&lt;span class=&quot;lisp-code&quot;&gt;&lt;a href=&quot;http://www.lispworks.com/reference/HyperSpec/Body/f_map.htm&quot; class=&quot;symbol&quot;&gt;map&lt;/a&gt; &#39;&lt;a href=&quot;http://www.lispworks.com/reference/HyperSpec/Body/a_string.htm&quot; class=&quot;symbol&quot;&gt;string&lt;/a&gt; #&#39;&lt;a href=&quot;http://www.lispworks.com/reference/HyperSpec/Body/f_digit_.htm&quot; class=&quot;symbol&quot;&gt;digit-char&lt;/a&gt; digits&lt;/span&gt;)&lt;/span&gt;&lt;/span&gt;)&lt;/span&gt;&lt;/span&gt;)&lt;/span&gt;&lt;br&gt;&lt;br&gt;

&lt;span class=&quot;paren1&quot;&gt;(&lt;span class=&quot;lisp-code&quot;&gt;&lt;a href=&quot;http://www.lispworks.com/reference/HyperSpec/Body/m_defun.htm&quot; class=&quot;symbol&quot;&gt;&lt;i&gt;&lt;span class=&quot;symbol&quot;&gt;defun&lt;/span&gt;&lt;/i&gt;&lt;/a&gt; valid-birth-date &lt;span class=&quot;paren2&quot;&gt;(&lt;span class=&quot;lisp-code&quot;&gt;ik-digits&lt;/span&gt;)&lt;/span&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;string&quot;&gt;&quot;Kontrollib kas tegu on korrektse kuupäevaga&quot;&lt;/span&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;paren2&quot;&gt;(&lt;span class=&quot;lisp-code&quot;&gt;&lt;a href=&quot;http://www.lispworks.com/reference/HyperSpec/Body/s_let_l.htm&quot; class=&quot;symbol&quot;&gt;&lt;i&gt;&lt;span class=&quot;symbol&quot;&gt;let&lt;/span&gt;&lt;/i&gt;&lt;/a&gt; &lt;span class=&quot;paren3&quot;&gt;(&lt;span class=&quot;lisp-code&quot;&gt;&lt;span class=&quot;paren4&quot;&gt;(&lt;span class=&quot;lisp-code&quot;&gt;sajand&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;paren5&quot;&gt;(&lt;span class=&quot;lisp-code&quot;&gt;&lt;a href=&quot;http://www.lispworks.com/reference/HyperSpec/Body/m_case_.htm&quot; class=&quot;symbol&quot;&gt;case&lt;/a&gt; &lt;span class=&quot;paren6&quot;&gt;(&lt;span class=&quot;lisp-code&quot;&gt;&lt;a href=&quot;http://www.lispworks.com/reference/HyperSpec/Body/f_firstc.htm&quot; class=&quot;symbol&quot;&gt;first&lt;/a&gt; ik-digits&lt;/span&gt;)&lt;/span&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;paren6&quot;&gt;(&lt;span class=&quot;lisp-code&quot;&gt;&lt;span class=&quot;paren1&quot;&gt;(&lt;span class=&quot;lisp-code&quot;&gt;1 2&lt;/span&gt;)&lt;/span&gt; 1800&lt;/span&gt;)&lt;/span&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;paren6&quot;&gt;(&lt;span class=&quot;lisp-code&quot;&gt;&lt;span class=&quot;paren1&quot;&gt;(&lt;span class=&quot;lisp-code&quot;&gt;3 4&lt;/span&gt;)&lt;/span&gt; 1900&lt;/span&gt;)&lt;/span&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;paren6&quot;&gt;(&lt;span class=&quot;lisp-code&quot;&gt;&lt;span class=&quot;paren1&quot;&gt;(&lt;span class=&quot;lisp-code&quot;&gt;5 6&lt;/span&gt;)&lt;/span&gt; 2000&lt;/span&gt;)&lt;/span&gt;&lt;/span&gt;)&lt;/span&gt;&lt;/span&gt;)&lt;/span&gt;&lt;/span&gt;)&lt;/span&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;paren3&quot;&gt;(&lt;span class=&quot;lisp-code&quot;&gt;&lt;a href=&quot;http://www.lispworks.com/reference/HyperSpec/Body/m_when_.htm&quot; class=&quot;symbol&quot;&gt;when&lt;/a&gt; sajand&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;paren4&quot;&gt;(&lt;span class=&quot;lisp-code&quot;&gt;&lt;a href=&quot;http://www.lispworks.com/reference/HyperSpec/Body/f_inte_1.htm&quot; class=&quot;symbol&quot;&gt;integerp&lt;/a&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;paren5&quot;&gt;(&lt;span class=&quot;lisp-code&quot;&gt;&lt;a href=&quot;http://www.lispworks.com/reference/HyperSpec/Body/m_ignore.htm&quot; class=&quot;symbol&quot;&gt;ignore-errors&lt;/a&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;paren6&quot;&gt;(&lt;span class=&quot;lisp-code&quot;&gt;&lt;a href=&quot;http://www.lispworks.com/reference/HyperSpec/Body/f_encode.htm&quot; class=&quot;symbol&quot;&gt;encode-universal-time&lt;/a&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;0 0 0&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;paren1&quot;&gt;(&lt;span class=&quot;lisp-code&quot;&gt;digits-to-number &lt;span class=&quot;paren2&quot;&gt;(&lt;span class=&quot;lisp-code&quot;&gt;&lt;a href=&quot;http://www.lispworks.com/reference/HyperSpec/Body/f_subseq.htm&quot; class=&quot;symbol&quot;&gt;subseq&lt;/a&gt; ik-digits 5 7&lt;/span&gt;)&lt;/span&gt;&lt;/span&gt;)&lt;/span&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;paren1&quot;&gt;(&lt;span class=&quot;lisp-code&quot;&gt;digits-to-number &lt;span class=&quot;paren2&quot;&gt;(&lt;span class=&quot;lisp-code&quot;&gt;&lt;a href=&quot;http://www.lispworks.com/reference/HyperSpec/Body/f_subseq.htm&quot; class=&quot;symbol&quot;&gt;subseq&lt;/a&gt; ik-digits 3 5&lt;/span&gt;)&lt;/span&gt;&lt;/span&gt;)&lt;/span&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;paren1&quot;&gt;(&lt;span class=&quot;lisp-code&quot;&gt;&lt;a href=&quot;http://www.lispworks.com/reference/HyperSpec/Body/a_pl.htm&quot; class=&quot;symbol&quot;&gt;+&lt;/a&gt; sajand &lt;span class=&quot;paren2&quot;&gt;(&lt;span class=&quot;lisp-code&quot;&gt;digits-to-number &lt;span class=&quot;paren3&quot;&gt;(&lt;span class=&quot;lisp-code&quot;&gt;&lt;a href=&quot;http://www.lispworks.com/reference/HyperSpec/Body/f_subseq.htm&quot; class=&quot;symbol&quot;&gt;subseq&lt;/a&gt; ik-digits 1 3&lt;/span&gt;)&lt;/span&gt;&lt;/span&gt;)&lt;/span&gt;&lt;/span&gt;)&lt;/span&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;0&lt;/span&gt;)&lt;/span&gt;&lt;/span&gt;)&lt;/span&gt;&lt;/span&gt;)&lt;/span&gt;&lt;/span&gt;)&lt;/span&gt;&lt;/span&gt;)&lt;/span&gt;&lt;/span&gt;)&lt;/span&gt;&lt;br&gt;&lt;br&gt;

&lt;span class=&quot;paren1&quot;&gt;(&lt;span class=&quot;lisp-code&quot;&gt;&lt;a href=&quot;http://www.lispworks.com/reference/HyperSpec/Body/m_defun.htm&quot; class=&quot;symbol&quot;&gt;&lt;i&gt;&lt;span class=&quot;symbol&quot;&gt;defun&lt;/span&gt;&lt;/i&gt;&lt;/a&gt; checksum &lt;span class=&quot;paren2&quot;&gt;(&lt;span class=&quot;lisp-code&quot;&gt;ik-digits fn&lt;/span&gt;)&lt;/span&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;paren2&quot;&gt;(&lt;span class=&quot;lisp-code&quot;&gt;&lt;a href=&quot;http://www.lispworks.com/reference/HyperSpec/Body/a_mod.htm&quot; class=&quot;symbol&quot;&gt;mod&lt;/a&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;paren3&quot;&gt;(&lt;span class=&quot;lisp-code&quot;&gt;&lt;a href=&quot;http://www.lispworks.com/reference/HyperSpec/Body/m_loop.htm&quot; class=&quot;symbol&quot;&gt;&lt;i&gt;&lt;span class=&quot;symbol&quot;&gt;loop&lt;/span&gt;&lt;/i&gt;&lt;/a&gt; for n from 1 to 10&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sum &lt;span class=&quot;paren4&quot;&gt;(&lt;span class=&quot;lisp-code&quot;&gt;&lt;a href=&quot;http://www.lispworks.com/reference/HyperSpec/Body/a_st.htm&quot; class=&quot;symbol&quot;&gt;*&lt;/a&gt; &lt;span class=&quot;paren5&quot;&gt;(&lt;span class=&quot;lisp-code&quot;&gt;&lt;a href=&quot;http://www.lispworks.com/reference/HyperSpec/Body/f_1pl_1_.htm&quot; class=&quot;symbol&quot;&gt;1+&lt;/a&gt; &lt;span class=&quot;paren6&quot;&gt;(&lt;span class=&quot;lisp-code&quot;&gt;&lt;a href=&quot;http://www.lispworks.com/reference/HyperSpec/Body/a_mod.htm&quot; class=&quot;symbol&quot;&gt;mod&lt;/a&gt; &lt;span class=&quot;paren1&quot;&gt;(&lt;span class=&quot;lisp-code&quot;&gt;&lt;a href=&quot;http://www.lispworks.com/reference/HyperSpec/Body/f_funcal.htm&quot; class=&quot;symbol&quot;&gt;funcall&lt;/a&gt; fn n&lt;/span&gt;)&lt;/span&gt; 9&lt;/span&gt;)&lt;/span&gt;&lt;/span&gt;)&lt;/span&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;paren5&quot;&gt;(&lt;span class=&quot;lisp-code&quot;&gt;&lt;a href=&quot;http://www.lispworks.com/reference/HyperSpec/Body/f_nth.htm&quot; class=&quot;symbol&quot;&gt;nth&lt;/a&gt; &lt;span class=&quot;paren6&quot;&gt;(&lt;span class=&quot;lisp-code&quot;&gt;&lt;a href=&quot;http://www.lispworks.com/reference/HyperSpec/Body/f_1pl_1_.htm&quot; class=&quot;symbol&quot;&gt;1-&lt;/a&gt; n&lt;/span&gt;)&lt;/span&gt; ik-digits&lt;/span&gt;)&lt;/span&gt;&lt;/span&gt;)&lt;/span&gt;&lt;/span&gt;)&lt;/span&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;11&lt;/span&gt;)&lt;/span&gt;&lt;/span&gt;)&lt;/span&gt;&lt;br&gt;&lt;br&gt;

&lt;span class=&quot;paren1&quot;&gt;(&lt;span class=&quot;lisp-code&quot;&gt;&lt;a href=&quot;http://www.lispworks.com/reference/HyperSpec/Body/m_defun.htm&quot; class=&quot;symbol&quot;&gt;&lt;i&gt;&lt;span class=&quot;symbol&quot;&gt;defun&lt;/span&gt;&lt;/i&gt;&lt;/a&gt; valid-checksum &lt;span class=&quot;paren2&quot;&gt;(&lt;span class=&quot;lisp-code&quot;&gt;ik-digits&lt;/span&gt;)&lt;/span&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;paren2&quot;&gt;(&lt;span class=&quot;lisp-code&quot;&gt;= &lt;span class=&quot;paren3&quot;&gt;(&lt;span class=&quot;lisp-code&quot;&gt;&lt;a href=&quot;http://www.lispworks.com/reference/HyperSpec/Body/f_firstc.htm&quot; class=&quot;symbol&quot;&gt;first&lt;/a&gt; &lt;span class=&quot;paren4&quot;&gt;(&lt;span class=&quot;lisp-code&quot;&gt;&lt;a href=&quot;http://www.lispworks.com/reference/HyperSpec/Body/f_last.htm&quot; class=&quot;symbol&quot;&gt;last&lt;/a&gt; ik-digits&lt;/span&gt;)&lt;/span&gt;&lt;/span&gt;)&lt;/span&gt; &amp;nbsp;&lt;span class=&quot;comment&quot;&gt;;; kontrollnumber&lt;br&gt;

&lt;/span&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;paren3&quot;&gt;(&lt;span class=&quot;lisp-code&quot;&gt;&lt;a href=&quot;http://www.lispworks.com/reference/HyperSpec/Body/s_let_l.htm&quot; class=&quot;symbol&quot;&gt;&lt;i&gt;&lt;span class=&quot;symbol&quot;&gt;let&lt;/span&gt;&lt;/i&gt;&lt;/a&gt; &lt;span class=&quot;paren4&quot;&gt;(&lt;span class=&quot;lisp-code&quot;&gt;&lt;span class=&quot;paren5&quot;&gt;(&lt;span class=&quot;lisp-code&quot;&gt;result &lt;span class=&quot;paren6&quot;&gt;(&lt;span class=&quot;lisp-code&quot;&gt;checksum ik-digits &#39;&lt;a href=&quot;http://www.lispworks.com/reference/HyperSpec/Body/f_1pl_1_.htm&quot; class=&quot;symbol&quot;&gt;1-&lt;/a&gt;&lt;/span&gt;)&lt;/span&gt;&lt;/span&gt;)&lt;/span&gt;&lt;/span&gt;)&lt;/span&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;paren4&quot;&gt;(&lt;span class=&quot;lisp-code&quot;&gt;&lt;a href=&quot;http://www.lispworks.com/reference/HyperSpec/Body/s_if.htm&quot; class=&quot;symbol&quot;&gt;&lt;i&gt;&lt;span class=&quot;symbol&quot;&gt;if&lt;/span&gt;&lt;/i&gt;&lt;/a&gt; &lt;span class=&quot;paren5&quot;&gt;(&lt;span class=&quot;lisp-code&quot;&gt;= 10 result&lt;/span&gt;)&lt;/span&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;paren5&quot;&gt;(&lt;span class=&quot;lisp-code&quot;&gt;&lt;a href=&quot;http://www.lispworks.com/reference/HyperSpec/Body/a_mod.htm&quot; class=&quot;symbol&quot;&gt;mod&lt;/a&gt; &lt;span class=&quot;paren6&quot;&gt;(&lt;span class=&quot;lisp-code&quot;&gt;checksum ik-digits &#39;&lt;a href=&quot;http://www.lispworks.com/reference/HyperSpec/Body/f_1pl_1_.htm&quot; class=&quot;symbol&quot;&gt;1+&lt;/a&gt;&lt;/span&gt;)&lt;/span&gt; 10&lt;/span&gt;)&lt;/span&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;result&lt;/span&gt;)&lt;/span&gt;&lt;/span&gt;)&lt;/span&gt;&lt;/span&gt;)&lt;/span&gt;&lt;/span&gt;)&lt;/span&gt;&lt;br&gt;&lt;br&gt;

&lt;span class=&quot;paren1&quot;&gt;(&lt;span class=&quot;lisp-code&quot;&gt;&lt;a href=&quot;http://www.lispworks.com/reference/HyperSpec/Body/m_defun.htm&quot; class=&quot;symbol&quot;&gt;&lt;i&gt;&lt;span class=&quot;symbol&quot;&gt;defun&lt;/span&gt;&lt;/i&gt;&lt;/a&gt; valid-isikukood &lt;span class=&quot;paren2&quot;&gt;(&lt;span class=&quot;lisp-code&quot;&gt;isikukood&lt;/span&gt;)&lt;/span&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;paren2&quot;&gt;(&lt;span class=&quot;lisp-code&quot;&gt;&lt;a href=&quot;http://www.lispworks.com/reference/HyperSpec/Body/s_let_l.htm&quot; class=&quot;symbol&quot;&gt;&lt;i&gt;&lt;span class=&quot;symbol&quot;&gt;let&lt;/span&gt;&lt;/i&gt;&lt;/a&gt; &lt;span class=&quot;paren3&quot;&gt;(&lt;span class=&quot;lisp-code&quot;&gt;&lt;span class=&quot;paren4&quot;&gt;(&lt;span class=&quot;lisp-code&quot;&gt;ik-digits &lt;span class=&quot;paren5&quot;&gt;(&lt;span class=&quot;lisp-code&quot;&gt;number-to-digits isikukood&lt;/span&gt;)&lt;/span&gt;&lt;/span&gt;)&lt;/span&gt;&lt;/span&gt;)&lt;/span&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;paren3&quot;&gt;(&lt;span class=&quot;lisp-code&quot;&gt;&lt;a href=&quot;http://www.lispworks.com/reference/HyperSpec/Body/a_and.htm&quot; class=&quot;symbol&quot;&gt;and&lt;/a&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;paren4&quot;&gt;(&lt;span class=&quot;lisp-code&quot;&gt;= &lt;span class=&quot;paren5&quot;&gt;(&lt;span class=&quot;lisp-code&quot;&gt;&lt;a href=&quot;http://www.lispworks.com/reference/HyperSpec/Body/f_length.htm&quot; class=&quot;symbol&quot;&gt;length&lt;/a&gt; ik-digits&lt;/span&gt;)&lt;/span&gt; 11&lt;/span&gt;)&lt;/span&gt; &lt;span class=&quot;comment&quot;&gt;;; peab sisaldama 11 numbrit&lt;br&gt;

&lt;/span&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;paren4&quot;&gt;(&lt;span class=&quot;lisp-code&quot;&gt;valid-birth-date ik-digits&lt;/span&gt;)&lt;/span&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;paren4&quot;&gt;(&lt;span class=&quot;lisp-code&quot;&gt;valid-checksum ik-digits&lt;/span&gt;)&lt;/span&gt;&lt;/span&gt;)&lt;/span&gt;&lt;/span&gt;)&lt;/span&gt;&lt;/span&gt;)&lt;/span&gt;&lt;/tt&gt;
&lt;p&gt;&lt;h3&gt;Tulemused:&lt;/h3&gt;
CL-USER 57 &gt; (time (valid-isikukood 21107190012))&lt;br&gt;
Timing the evaluation of (VALID-ISIKUKOOD 21107190012)&lt;br&gt;

&lt;br&gt;
User time    =        0.000&lt;br&gt;
System time  =        0.000&lt;br&gt;
Elapsed time =        0.000&lt;br&gt;
Allocation   = 300 bytes&lt;br&gt;
0 Page faults&lt;br&gt;
T&lt;br&gt;
&lt;br&gt;
CL-USER 58 &gt; (time (valid-isikukood &quot;21107190012&quot;))&lt;br&gt;
Timing the evaluation of (VALID-ISIKUKOOD &quot;21107190012&quot;)&lt;br&gt;

&lt;br&gt;
User time    =        0.000&lt;br&gt;
System time  =        0.000&lt;br&gt;
Elapsed time =        0.000&lt;br&gt;
Allocation   = 288 bytes&lt;br&gt;
0 Page faults&lt;br&gt;
T&lt;br&gt;
&lt;br&gt;
CL-USER 59 &gt; (time (valid-isikukood 21107190013))&lt;br&gt;
Timing the evaluation of (VALID-ISIKUKOOD 21107190013)&lt;br&gt;

&lt;br&gt;
User time    =        0.000&lt;br&gt;
System time  =        0.000&lt;br&gt;
Elapsed time =        0.000&lt;br&gt;
Allocation   = 300 bytes&lt;br&gt;
0 Page faults&lt;br&gt;
NIL&lt;br&gt;
&lt;br&gt;
&lt;br&gt;&lt;p&gt;Huvitav on see, et kui anda isikukood ette stringina siis võtab programm vähem mälu kui numbritega.&lt;br&gt;&lt;br&gt;&lt;p&gt;Seda koodi saab &lt;a href=&quot;http://www.lispworks.com/downloads/index.html&quot;&gt;Lispworksis&lt;/a&gt; kasutada ka läbi graafilise liidese:

&lt;p&gt;&lt;tt class=&quot;lisp-code&quot;&gt;&lt;span class=&quot;paren1&quot;&gt;(&lt;span class=&quot;lisp-code&quot;&gt;capi:prompt-for-integer&lt;br&gt;&amp;nbsp;&lt;span class=&quot;string&quot;&gt;&quot;Sisesta isikukood:&quot;&lt;/span&gt;&lt;br&gt;&amp;nbsp;&lt;span class=&quot;keyword&quot;&gt;:ok-check&lt;/span&gt; &#39;valid-isikukood&lt;/span&gt;)&lt;/span&gt;&lt;/tt&gt;
&lt;p&gt;Tulemusena avaneb selline aken:&lt;br&gt;
&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://www.lo.pri.ee/ik.exe&quot;&gt;&lt;img style=&quot;cursor:pointer; cursor:hand;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-VmblGnUw9TXWQhyR7o034ADWu1qbn23XgSNl0T5_-vUiF5yt7wLLDFVQcFrxSfSrp05AlHeGOqghzQAhobrQyBuj0OsLEgSmG_nK6S1IocHOFnntDHZVU59Ui6PMzITyh6nR/s320/lw-isikukood.PNG&quot; border=&quot;0&quot; alt=&quot;&quot;id=&quot;BLOGGER_PHOTO_ID_5178300487124548402&quot; /&gt;&lt;/a&gt;&lt;br&gt;
Ok-nupp aktiveerub alles siis kui sisestatud on korrektne isikukood.</content><link rel='replies' type='application/atom+xml' href='http://laurum.blogspot.com/feeds/4180620222949103573/comments/default' title='Postituse kommentaarid'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/13053494/4180620222949103573' title='0 kommentaari'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13053494/posts/default/4180620222949103573'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13053494/posts/default/4180620222949103573'/><link rel='alternate' type='text/html' href='http://laurum.blogspot.com/2008/03/eesti-isikukoodi-valideerimine-lispis.html' title='Eesti isikukoodi valideerimine Lispis'/><author><name>Lauri</name><uri>http://www.blogger.com/profile/00705740653107945481</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-VmblGnUw9TXWQhyR7o034ADWu1qbn23XgSNl0T5_-vUiF5yt7wLLDFVQcFrxSfSrp05AlHeGOqghzQAhobrQyBuj0OsLEgSmG_nK6S1IocHOFnntDHZVU59Ui6PMzITyh6nR/s72-c/lw-isikukood.PNG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13053494.post-114724963213529211</id><published>2006-05-10T11:16:00.001+03:00</published><updated>2008-03-15T15:18:01.975+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="lisp"/><title type='text'>PLEAC</title><content type='html'>&lt;a href=&quot;http://pleac.sourceforge.net/&quot;&gt;PLEAC project&lt;/a&gt; - Programming Language Examples Alike Cookbook in various programming languages.</content><link rel='replies' type='application/atom+xml' href='http://laurum.blogspot.com/feeds/114724963213529211/comments/default' title='Postituse kommentaarid'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/13053494/114724963213529211' title='0 kommentaari'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13053494/posts/default/114724963213529211'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13053494/posts/default/114724963213529211'/><link rel='alternate' type='text/html' href='http://laurum.blogspot.com/2006/05/pleac.html' title='PLEAC'/><author><name>Lauri</name><uri>http://www.blogger.com/profile/00705740653107945481</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>