RosettaCodeData/Task/Floyds-triangle/PicoLisp/floyds-triangle-2.l
2023-07-01 13:44:08 -04:00

10 lines
266 B
Text

(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) ) ) )