Consider the ternary operator in Julia
julia> x = 1 ; y = 2julia> println(x < y ? "less than" : "not less than")less than
Question: Is there a way to omit the :
part of the statement ? Something which would be equivalent to
if condition # dosomethingend
without writing that if the condition is not met, nothing should be done.
NB: I researched the answer but nothing came out, even in related questions (1, 2)