Sequence should have tail()

Originator:robnapier
Number:rdar://17905135 Date Originated:04-Aug-2014 03:02 PM
Status: Resolved:
Product:Swift Product Version:6beta5
Classification: Reproducible:
 
It should be possible to extract the tail() (everything but the head) of a Sequence. Many algorithms rely on splitting a list into its head and tail. Ideally this should be pattern-matchable, at least for certain subtypes (such as Array).

---

This is mostly addressed by dropFirst(), but a pattern-matchable version would still be very helpful (something that splits head/tail).

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!