Skip to content

Instantly share code, notes, and snippets.

View AccordionGuy's full-sized avatar

Joey deVilla AccordionGuy

View GitHub Profile
******************************************************************
*
* Stupid Interest Calculator
* ==========================
*
* A sample COBOL app to demonstrate the programming language
* and make me doubt that I’m living in the 21st century.
*
******************************************************************
@AccordionGuy
AccordionGuy / map-filter-reduce.playground
Last active May 8, 2019 07:54
Map, filter, and reduce in Swift, explained with emoji
// Map
func cook(_ item: String) -> String {
let cookupTable = [
"🐮": "🍔", // Cow face -> burger
"🐄": "🍔", // Cow -> burger
"🐂": "🍖", // Ox -> meat on bone
"🐷": "🍖", // Pig face -> meat on bone
"🐽": "🍖", // Pig nose -> meat on bone
"🐖": "🍖", // Pig -> meat on bone