equals 23  
      1 pl/ 22
equals 'hello'  
      ('h' ap//// 'e') ap/ ('l' ap/ 'lo')
equals 'hello'  
      'he' ap/ 'l' ap// 'lo'
equals 25  
      3 ti/ 3 pl// 4 ti/ 4

equals 142  
      m= Map new; m at: 10 put: 100; m at: 10 pl:: 42
equals 142  
      m= Map new; m at:: 4 pl: 6 put:: 10 ti: 10; m at: 10 pl:: 42

equals 'ok'    
      3 lt/ 5   y//[ 'ok' ] n// [ 'oops' ]
equals 'oops'    
      8 lt/ 0 y//[ 'ok' ] n// [ 'oops' ]
equals 'ok'    
      2 lt/ 3   y//[ 'ok' ]
equals nil    
      8 lt/ 0    y//[ 'ok' ]
equals nil    
      -8 lt/ 0    n//[ 'ok' ]

equals VEC{ 4; 7; 9; }
    VEC{ 2 ti/ 2; 7; 3 ti/ 3; }

#meth Vec eqVec:
#  a cls name eq 'Vec'
#    n: [0]
#    y: [
#      self len eq: a len
#        n: [0]
#	y: [
#	  s= 0
#	  self len do: [:i
#	    s= s pl/// self at: i eq// a at: i
#	  ]
#	  s eq: self len
#	]
#      ]

meth Vec fmap:
    "Goldberg & Robson, 1989. p215"
    z= self cls new .
    self do: [ :x .
      z ap: ( a run: x ) ] .
    z

equals VEC{ 100; 400; 900; }
  VEC{ 10; 20; 30; } fmap: [:x . x ti: x]

meth Vec select:
    "Goldberg & Robson, 1989. p216"
    z= self cls new .
    self do: [ :x .
      ( a run: x ) y: [
        z ap: x ] ] .
    z

## { meth Obj tup
##     "Create a Singleton Tuple (a Vector)."
##     [ self ] vec
## }
## { meth Obj tu:
##     "Create a Tuple (a Vector) of Two Objects."
##     [ self . a ] vec
## }
## { meth Obj tu:tu:
##     "Create a Tuple (a Vector) of Three Objects."
##     [ self . a . b ] vec
## }
## { meth Blk join:
##   sb= Buf new .
##   f= Tru .
##   self vec do: [ :x .
##     f n: [ sb ap: a . f = Fal ] .
##     sb ap: x ] .
##   sb str .
## }
##   
## 
## { class App Usr }
## { class TopApp App }
## 
## { meth TopApp handle:quer:
##   "Default class for handling '/'."
## 
##   Map new  at: 'type' pu: 'list'
##   	, at 'title' pu a
##   	, at 'value' pu [
## 	  [ '@@@link|/Browse|Browse' . 'Browse Classes.' ] vec .
## 
## 	  [ '@@@link|/FormDoit|doit' . 'Evaluate code' ] vec .
## 
## 	] vec
## 	.
## }
## 
## { class Browse App }
## { meth Browse handle:quer:
##   ww= a spli: '[.]' .  "It's a regexp."
##   wl= ww len .
##   gm= Sys globalMap .
## 
##   "Start the list V with an UP link."
##   v= [ '@@@link|/|TOP' tu: 'GOTO TOP.' ] vec .
## 
##   ( wl eq: 1 ) y: [
##     "gk are Good Keys, those that are classes."
##     gk= gm dir select: [ i .
##         AND{ gm at: i , cls nam ends: 'Cls' .
##              OR{ gm at: i , nam ends: 'Cls' , not .
## 	         gm at: i , cls nam eq 'ClsCls' . } } ] .
## 
##     gk do: [ :k .
##         kc= gm at: k .
##         kn= kc nam .
##         v ap: ( '@@@link|/Browse.' ap: kn , ap: '|' , ap: kn , tu: kc meths str ) .
##         ] .
## 
##     z= Map new  at: 'type' pu: 'list'
##   	, at 'title' pu 'Browsing All Classes'
##   	, at 'extra' pu ( gm )
##   	, at 'extraKeys' pu ( gm dir )
##   	, at 'extraFmap' pu ( gm dir fmap: [ i . ( gm at: i ) cls cls nam ] )
##   	, at 'extraSelect' pu gk
##   	, at 'value' pu v
## 	.
##   ] .
##   
##   ( wl eq: 2 ) y: [
##     cn= ww at: 1 .  "class name"
##     co= gm at: cn toLower .   "class object"
## 
##     d= co cls methd .
##     d dir do: [ :x . "For each class method"
##       v ap: ( ( '@@@link|/EditMethod.' ap: cn , ap: 'Cls.' , ap: x , ap: '|class ' , ap: x ) , tu: ( d at: x , str ) ) . 
##     ] .
## 
##     d= co methd .
##     d dir do: [ :x . "For each instance method"
##       v ap: ( ( '@@@link|/EditMethod.' ap: cn , ap: '.' , ap: x , ap: '|' , ap: x ) tu: ( d at: x , str ) ) .
##     ] .
## 
##     z= Map new  at: 'type' pu: 'list'
##   	, at 'title' pu ( 'Browsing Class' ap: cn )
##   	, at 'value' pu v
## 	.
##   ] .
##   z .
## }
## 
## { class EditMethod App }
## { meth EditMethod handle:quer:
##   ww= a spli: '[.]' .  "It's a regexp."
##   wl= ww len .
##   gm= Sys globalMap .
## 
##   ( wl ne: 3 ) y: [ Zork foo ] .
## 
##   cn= ww at: 1 .  "class name"
##   mn= ww at: 2 .  "method name"
## 
##   co= gm at: cn toLower .   "class object"
##   mo= co methd at: mn .  "method object"
## 
##   z= Map new  at: 'type' pu: 'edit'
##   	, at 'title' pu ( 'Editing Class' ap: cn , ap: ' Method ' , ap: mn )
##   	, at 'value' pu ( mo str )
##   	, at 'action' pu ( '/SubmitMethod' )
##   	, at 'field1' pu 'ClassName'
##   	, at 'value1' pu cn
##   	, at 'field2' pu 'MethodName'
##   	, at 'value2' pu mn
## 	.
##   z .
## }
## 
## { class SubmitMethod App }
## { meth SubmitMethod handle:quer:
##   gm= Sys globalMap .
## 
##   cn= b at: 'ClassName' .
##   mn= b at: 'MethodName' .
## 
##   co= gm at: cn tolower .
## 
##   z= co definemethod: mn abbrev: '' docstr: '' code: ( b at: 'text' ) .
## 
##   MAP[ 'type' . 'text' .
##   	'title' . ( 'Submitting (NOT REALLY) Class' ap: cn , ap: ' Method ' , ap: mn ) .
##   	'value' . 'XXX' .
##   	'URL' . a .
##   	'QUERY' . b .
## 	'Z' . z .
##   ] .
## }
## 
## { class FormDoit App }
## { meth FormDoit handle:quer:
##   MAP[ 'type' . 'edit' .
##        'title' . 'Doit Form' .
##        'value' . '' .
##        'action' . '/SubmitDoit' .
##   ] .
## }
## 
## { class SubmitDoit App }
## { meth SubmitDoit handle:quer:
##   z= App new doit: ( b at 'text' ) .
##   MAP[ 'type' . 'text' .
##        'title' . [ 'doit:' . ( b at 'text' ) str ] join: ' ' .
##        'value' . z str .
##   ] .
## }
