<story_type_all_caps(BUG | FEATURE | CHORE)> - <story_title>
[#<story_number>]
Add description here - should describe the problem
(function() { | |
angular.module('DatepickerModule', []) | |
})(); | |
(function() { | |
'use strict'; | |
/** | |
* This component is my alternative to the directive wrapper approach, and makes use of | |
* component's onUpdate method to pass in a callback to the parent component. |
# Subject (one line summary of description) | |
# __RELATED STORY:__ | |
# __<BUG | FEATURE | CHORE>__ - *<Story Title>* | |
# \[[#<story-id>](<story-url>)\] | |
# __DESCRIPTION:__ | |
# Body (What and Why) | |
# Elaborate on the reasons changes were made here |
<story_type_all_caps(BUG | FEATURE | CHORE)> - <story_title>
[#<story_number>]
Add description here - should describe the problem
# Never do this for real. | |
class Array | |
def count | |
'fish' | |
end | |
end |
class Integer | |
def fizzbuzziness | |
{ 'Fizz' => (self % 3).zero?, 'Buzz' => (self % 5).zero? } | |
.select { |_key, value| value } | |
.keys | |
.inject('') { |prev, curr| "#{prev}#{curr}" } | |
end | |
end |
(defn fizzbuzziness [num] | |
(def tbl {"Fizz" (mod num 3),"Buzz" (mod num 5)}) | |
(clojure.string/join "" (filter (comp #{0} tbl) (keys tbl)))) |
#include <iostream> | |
#include <string> | |
#include <map> | |
#include <vector> | |
#include <numeric> | |
using namespace std; | |
map<string, bool, greater<string>> fbMap(int num) { | |
map<string, bool, greater<string>> tbl; |
from functools import reduce | |
def fizzbuzziness(num): | |
tbl = { 'Fizz': num % 3 == 0, 'Buzz': num % 5 == 0 } | |
trues = { k: v for k, v in tbl.items() if v } | |
return reduce((lambda x, y: x + y), list(trues.keys()), '') |
(() => { | |
'use strict' | |
const fizzbuzziness = (num) => { | |
const tbl = Object({ 'Fizz': (num % 3 === 0), 'Buzz': (num % 5 === 0) }) | |
return Object | |
.keys(tbl) | |
.filter(key => tbl[key]) | |
.reduce((acc, curr) => { return `${acc}${curr}` }, '') | |
} |
// num is a whole number Integer | |
(const fizzbuzziness = (num) => { | |
if((num % 3 === 0) && (num % 5 === 0)) { | |
return 'FizzBuzz' | |
} else if(num % 3 === 0) { | |
return 'Fizz' | |
} else if(num % 5 === 0) { | |
return 'Buzz' | |
} else { | |
return '' |