What is the Hy equivalent of Python's a if condition else b
?
I'm trying to convert something like this
return (quicksort(under) if under else []) + same + (quicksort(over) if over else [])
to Hy. It avoids calling quicksort()
if the list is empty. I know I can do
(if under
(quicksort under)
[])
but I'd rather have it on one line