curried shuffle function