Skip to content

Instantly share code, notes, and snippets.

@bsitruk
bsitruk / join-array-by-key.js
Created November 20, 2015 14:15
Functional programming: join two arrays by a key
function() {
var lists = [
{
"id": 5434364,
"name": "New Releases"
},
{
"id": 65456475,
name: "Thrillers"
}
@bsitruk
bsitruk / combine-map-with-zip.js
Last active November 20, 2015 14:18
Functional programming: Combine map with zip
function() {
var movieLists = [
{
name: "New Releases",
videos: [
{
"id": 70111470,
"title": "Die Hard",
"boxarts": [
{ width: 150, height:200, url:"http://cdn-0.nflximg.com/images/2891/DieHard150.jpg" },
@bsitruk
bsitruk / combine-map-with-reduce.js
Last active November 20, 2015 11:37
Functional programming: Combining map with reduce
function() {
var movieLists = [
{
name: "New Releases",
videos: [
{
"id": 70111470,
"title": "Die Hard",
"boxarts": [
{ width: 150, height:200, url:"http://cdn-0.nflximg.com/images/2891/DieHard150.jpg" },
@bsitruk
bsitruk / combining-map-with-concatAll.js
Last active November 20, 2015 11:38
Functional programming: Combining map with concatAll
function() {
var movieLists = [
{
name: "New Releases",
videos: [
{
"id": 70111470,
"title": "Die Hard",
"boxart": "http://cdn-0.nflximg.com/images/2891/DieHard.jpg",
"uri": "http://api.netflix.com/catalog/titles/movies/70111470",