I find that it’s quite common for me to write a function that requires the input to be iterable. But I don’t think there is a good way to restrict it to that. I think I would love to see a trait system built into Julia e.g.
fn(x::Symbol) = fn((x,)) function fn(x_itr:::IterableTrait) ## do something to each success element of `x_itr` end
What’s the best way to achieve what I want so far in your opinion.