Re: Standard library praise and challenge
- Posted by SDPringle Sep 18, 2011
- 2938 views
There seems to be very divergent opinions on what should happen with max
Mine are:
max(atom) => typecheck error max({}) => typecheck error max({4,32,2}) => 32 max({"Ax",'a'}) => "Ax" max({"Ursula","Susan","Barbara"}) => "Ursula"
Similar results with min. sum and product should work as if you string the members with separators + and * respectively. or_all should work as if you run or_bits(..,or_bits(..., ... ) on the members. The members of a sequence s are defined as s[1], s[2], ... , s[$]. Fortunately, we have namespaces and we can roll our own function definitions.
Shawn Pringle