This could be achieved much easier by using the // and \\ if operators. For example:
alias iseven return $iif($1 // 2,$true,$false)