I hereby claim:
- I am zbarnes757 on github.
- I am zbarnes757 (https://keybase.io/zbarnes757) on keybase.
- I have a public key ASA4qvQfya_29PwyXQCxVdeZUB7OsKjr9flyJ5TEINfKrgo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
function defaultName() { | |
return "name"; | |
} | |
function handle({ name = defaultName() } = {}) { | |
console.log(name); | |
} | |
handle(); |
const Promise = require('bluebird'); | |
const stocks = ['aapl', 'googl', 'f', 'gm']; | |
function getThings(things) { | |
// DOCS: http://bluebirdjs.com/docs/api/promise.map.html | |
return Promise.map(things, thing => Promise.resolve(thing), { concurrency: 2 }); | |
} | |
getThings(stocks); |
package main | |
import ( | |
"fmt" | |
"time" | |
) | |
var chan1 = make(chan string) | |
var chan2 = make(chan string) |
function GuysHowMuchMeatShouldIServe(guests) { | |
let totalMeat = 0; | |
guests.forEach(guest => { | |
if (guest.age >= 18 && guest.gender == 'male') { | |
totalMeat += 1; | |
} else if (guest.age >= 18 && guest.gender == 'female') { | |
totalMeat += 0.5; | |
} else if (guest.age < 18 && guest.nationality == 'Texas') { | |
totalMeat += 1; |
defmodule Clock do | |
def start do | |
time = {12, 0, 0} | |
print_time(time) | |
:timer.sleep(1_000) | |
increment_time(time) | |
end | |
defp increment_time(time) do | |
time = update_seconds(time) |