Re: Standard library praise and challenge

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

Re

type nonemptysequence(sequence s)  
    return length(s) != 0  
end type  
  
function max(nonemptysequence s)  
...  
  
function min(nonemptysequence s)  
... 

no good

nonemptysequence S = { {} } 
 
length(S) is 1 
 
max(S) is -inf 
new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu