Itemize()

From TinyMUX
Revision as of 21:17, 24 November 2008 by Keegan (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

ITEMIZE()

 FUNCTION: itemize(<list>[, <delim>[, <conj>[, <punc>]]])
 This function takes a <delim>-separated <list>, and:
  If there's just one element, return it.
  If there's two elements, return <e1> <conj> <e2>
  If there's more than two, return <e1><punc> <e2><punc> ... <conj> <en>
 The default <conj> is "and", default <punc> is ",", and default <delim> is
 space.
 Examples:
   > say [itemize(eggs)] * [itemize(eggs bacon)]
   You say, "eggs * eggs and bacon"
   > say [itemize(eggs bacon spam)]
   You say, "eggs, bacon, and spam"
   > say [itemize(eggs bacon spam, ,&,;)]
   You say, "eggs; bacon; & spam"