User talk:Ledrug: Difference between revisions
Content added Content deleted
No edit summary |
|||
Line 85: | Line 85: | ||
== Lisp in the style of the C++ generator == |
== Lisp in the style of the C++ generator == |
||
Please leave [http://rosettacode.org/wiki/Kaprekar_numbers#In_the_style_of_the_C.2B.2B_generator this code] alone until you can demonstrate an understanding of this problem. Your second attempt at this is an improvement over your first naive attempt, but still not as interesting as [http://rosettacode.org/wiki/Kaprekar_numbers#In_the_style_of_the_C.2B.2B_generator this]. Maybe I shall seperate the [http://rosettacode.org/wiki/Casting_out_nines Casting_out_nines] from the Kaprecar part: <lang clisp>(let ((kk (* N N))) (do ((B Base (* B Base))) ()(let (( nr (/ (* N (- B N)) (- B 1)))) (if (< 0 nr) (let ((q (floor (- N nr)))) (if (= kk (+ nr (* q B)))</lang> |
Please leave [http://rosettacode.org/wiki/Kaprekar_numbers#In_the_style_of_the_C.2B.2B_generator this code] alone until you can demonstrate an understanding of this problem. Your second attempt at this is an improvement over your first naive attempt, but still not as interesting as [http://rosettacode.org/wiki/Kaprekar_numbers#In_the_style_of_the_C.2B.2B_generator this]. Maybe I shall seperate the [http://rosettacode.org/wiki/Casting_out_nines Casting_out_nines] from the Kaprecar part: <lang clisp>(let ((kk (* N N))) (do ((B Base (* B Base))) ()(let (( nr (/ (* N (- B N)) (- B 1)))) (if (< 0 nr) (let ((q (floor (- N nr)))) (if (= kk (+ nr (* q B)))</lang> |
||
== Glitch in "Cut a rectangle" / CommonLisp == |
|||
In [[Cut_a_rectangle#Common_Lisp]] the fourth line reading |
|||
<lang lisp>(if (= w 1) (return-from cut-it h))</lang> |
|||
leads to shown output like |
|||
<pre>2 x 1: 2 4 x 1: 4</pre> etc. |
|||
where these rectangles obviously have only 1 symetric cut. |
|||
As I have no intention to change a language example I <s>cannot</s>do not intend to run, I just thought to give notice to the author instead. - [[User:PKai|pKai]] ([[User talk:PKai|talk]]) 20:44, 10 May 2013 (UTC) |