Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
9
Task/Floyds-triangle/PicoLisp/floyds-triangle-1.l
Normal file
9
Task/Floyds-triangle/PicoLisp/floyds-triangle-1.l
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
(de floyd (N)
|
||||
(let LLC (/ (* N (dec N)) 2)
|
||||
(for R N
|
||||
(for C R
|
||||
(prin
|
||||
(align
|
||||
(length (+ LLC C))
|
||||
(+ C (/ (* R (dec R)) 2)) ) )
|
||||
(if (= C R) (prinl) (space)) ) ) ) )
|
||||
10
Task/Floyds-triangle/PicoLisp/floyds-triangle-2.l
Normal file
10
Task/Floyds-triangle/PicoLisp/floyds-triangle-2.l
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
(de floyd (N)
|
||||
(let
|
||||
(Rows
|
||||
(make
|
||||
(for ((I . L) (range 1 (/ (* N (inc N)) 2)) L)
|
||||
(link (cut I 'L)) ) )
|
||||
Fmt (mapcar length (last Rows)) )
|
||||
(map inc (cdr Fmt))
|
||||
(for R Rows
|
||||
(apply tab R Fmt) ) ) )
|
||||
Loading…
Add table
Add a link
Reference in a new issue