Re: Standard library praise and challenge

new topic     » goto parent     » topic index » view thread      » older message » newer message

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

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu