I'm not sure whether @noinline is appropriate for this one. But adding it gives a compiler error related to the Data constraint, so I left it off for now.
I also think it might make sense to spin off all the stack functions into their own library file.
I'm halfway through a rewrite of sort to be a very type-safe demo of quicksort, but it's currently stalled, so in the meantime I thought I'd add this utility function.
I'm not sure whether
@noinline
is appropriate for this one. But adding it gives a compiler error related to theData
constraint, so I left it off for now.I also think it might make sense to spin off all the stack functions into their own library file.
I'm halfway through a rewrite of
sort
to be a very type-safe demo of quicksort, but it's currently stalled, so in the meantime I thought I'd add this utility function.