Parameters in Handlers

An example of optional parameters inside handlers using lists or records. From the AppleScript Users list

OS version: OS X

processArgs({1, 2, 3})
--> 30
processRecord({a:1, b:2, c:3})
--> {3,5}

on processArgs(args)
   set x to 5
   repeat with arg in args
     set x to x * arg
   end repeat
end processArgs

on processRecord(hash)
   set len to count hash as list
   set x to 5
   try
     set x to x + (d of hash)
   end try
   return {len, x}
end processRecord