basic: improve slices sample

Including append usage.