Skip to content

Instantly share code, notes, and snippets.

@Raynos

Raynos/x.js Secret

Created July 24, 2012 18:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Raynos/98a0b0c6f344961f6b6e to your computer and use it in GitHub Desktop.
Save Raynos/98a0b0c6f344961f6b6e to your computer and use it in GitHub Desktop.
function createVideos() {
// convert into tuples
var primary = reduce(mocks.primary.videos, intoTupleList(3), [])
, secondary = reduce(mocks.secondary.videos, intoTupleList(2), [])
, random = mocks.random.videos
// zip tuples together
var zipped = zip([primary, secondary, random], concat)
// flatten zipped tuples
return concat.apply([], zipped)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment