Stack shuffles as first-class data types