Skip to content

Instantly share code, notes, and snippets.

View Exey's full-sized avatar

Exey Panteleev Exey

View GitHub Profile
@jcamp
jcamp / video-editors-opensource.md
Last active April 24, 2026 02:50
OpenSource Video Editors
@ryansobol
ryansobol / Array+Permutations.swift
Last active August 12, 2021 15:38
Generate the permutations of a Swift array
extension Array {
func chopped() -> (Element, [Element])? {
guard let x = self.first else { return nil }
return (x, Array(self.suffix(from: 1)))
}
}
print([1, 2, 3].chopped())
// Optional((1, [2, 3]))