Well I'm too slow as usual, but here is my expiation attempt.
(defun ForFun ( / data result )
;; (while ..) - Returns The most recent value of the last expr. therefore in this case
;; it will return the 'result'
;; (tblnext table-name [rewind]) - get the next related item in the table
;; [rewind] If present and not nil, the first entry in it is retrieved
;; in this case (null data) returns T the first time through thus causing
;; the first record to be returned, thereafter it is nil & steps through the table
(while (setq data (tblnext "layer" (null data)))
(setq result ; collect the result each time through the loop
(cons ; (cons new-first-element list-or-atom) make a list
; because 'result' is nil the first time through and nil is considered
; a list, 'setq result' gets the first list from the mapcar and makes
; it a list, ((<mapcar output>)) on subsequent loops it becomes
; ((<mapcar output3>)(<mapcar output2>)(<mapcar output1>))
(mapcar ; Returns a list of the result of executing a function with the individual elements of a list
; In this case each item from the list (2 62 6) is fed to the lambda one at a time
; first 2, then 62 and finally 6
'(lambda (key) ; Defines an anonymous function
(cdr (assoc key data)) ; This function you know, assoc returns the list or pair if a match is found
; if 'data' is ((0 . "LAYER") (2 . "0") (70 . 0) (62 . 7) (6 . "Continuous"))
; (assoc 2 data ) returns (2 . "0") which is layer "0"
; (cdr (2 . "0")) returns "0"
)
'(2 62 6) ; this is the list in the mapcar statement
)
result ; this the list in the cons statement
)
)
)
)
<spelling>