in reply to Re: Re: $a++ allowed by $a-- is not ! why?
in thread $a++ allowed by $a-- is not ! why?
One-to-one means that F(s) = F(s') only happens if s=s'.
Onto means that for each t in the target space T there is an s such that F(s)=t.
The necessity that F(s) not have 2 values is required for F to be a function.
I knew I should check. (It's been far too long since I dealt with them separately... mostly what matters is whether a given function is a permutation or not.) Anyway, my point that ++ is not onto and therefore not reversible is still valid, even though I mixed up one-to-one pretty badly.
$;=sub{$/};@;=map{my($a,$b)=($_,$;);$;=sub{$a.$b->()}} split//,".rekcah lreP rehtona tsuJ";$\=$ ;->();print$/
|
|---|