Play audio slide show -- Keyboard shortcut: 'x'  Lecture overview -- Keyboard shortcut: 'u'  Previous page: Property lists -- Keyboard shortcut: 'p'  Next page: Programs represented as lists -- Keyboard shortcut: 'n'  Lecture notes - all slides together  Annotated slide -- Keyboard shortcut: 't'  Textbook -- Keyboard shortcut: 'v'  Alphabetic index  Help page about these notes  Course home      Expressions, Types, and Functions - slide 24 : 46

Tables as lists of rows

It is natural to represent tables as lists of rows, and to represent a row as a list

Tables play an important roles in many web documents

LAML has a strong support of tables

Expression

Value

tab1
(("This" "is" "first" "row")
 ("This" "is" "second" "row")
 ("This" "is" "third" "row")
 ("This" "is" "fourth" "row")
)
(show-table tab1)
Thisisfirstrow
Thisissecondrow
Thisisthirdrow
Thisisfourthrow
(show-table (transpose-1 tab1))
ThisThisThisThis
isisisis
firstsecondthirdfourth
rowrowrowrow
(show-table (eliminate-row 2 tab1))
Thisisfirstrow
Thisisthirdrow
Thisisfourthrow
(show-table (eliminate-column 4 tab1))
Thisisfirst
Thisissecond
Thisisthird
Thisisfourth
Later in this material we will study possible implementations of the function show-table