Anyone who can write an APL function should be able to host it on the web.™
Rendered webpage |
APL code |
:class liAdvanced: MiPageSample
⍝ Control:: _html.li _html.ol _html.ul
⍝ Description:: Add nested lists of varying types
∇ Compose;myol;myul;myli
:Access public
⍝ First we build a list container (ordered)
Add'Here is an ordered list:'
myol←Add _.ol
⍝ which contains 2 elements
myol.Add _.li'First item'
myol.Add _.li'Second item'
⍝ Then we build another list container (unordered this time)
myli←myol.Add _.li'Here is an unordered list:'
myul←myli.Add _.ul
⍝ which contains 3 elements
myul.Add _.li'First item'
myul.Add _.li'Second item'
myul.Add _.li'Third item'
∇
:endclass