Skip to content

Instantly share code, notes, and snippets.

View williamhjcho's full-sized avatar

William Hong Jun Cho williamhjcho

View GitHub Profile
@williamhjcho
williamhjcho / CurrencyFormatters.swift
Last active February 4, 2019 12:43
iOS - Currency Formatters Playground
import Foundation
extension Locale {
static var customer = Locale.ptBR
static let enUS = Locale(identifier: "en_US")
static let ptBR = Locale(identifier: "pt_BR")
static let esMX = Locale(identifier: "es_MX")
static let jaJP = Locale(identifier: "ja_JP")
static let frCA = Locale(identifier: "fr_CA")

What is a monad

Given the problem of dividing two numbers:

1 / 2
12 / 512
59 / -123
struct Test {
func a() {
b()
c() // can access if in same file (fileprivate)
d() // same (private)
e() // same (private extension)
f() // same (private extension and private method)
}
}

Programação Paralela - Trabalho

William Hong Jun Cho - 41420081

Game of Life (Conway)

Consiste de um tabuleiro de tamanho arbitrário, composto por células que possuem dois estados: vivo (1) ou morto (0). Para cada iteração no tabuleiro, é feita a seguinte passagem para cada célula:

  • Se uma célula possui menos de 2 vizinhos vivos, então ela será (ou continuará) morta na próxima iteração