Skip to content

Instantly share code, notes, and snippets.

Avatar

Brian Young briancordanyoung

View GitHub Profile
View Get all 100 point values from unix dictionary
//: Playground - noun: a place where people can play
import Cocoa
// Generate the appropriate integer value for each character using
// a the ascii value from the return unicodeScalars.
// UInt8 (Unsigned 8 bit Integer)
// a | A = 1
// z | Z = 26
// all others will be 0
extension Character {
@briancordanyoung
briancordanyoung / gist:49bf65bd40ba995c9f1f9dd799ad5f68
Last active May 4, 2018
Rough code for to count the 100 point words
View gist:49bf65bd40ba995c9f1f9dd799ad5f68
import Cocoa
// a = 97
// z = 122
let value = UInt8(ascii: "z")
extension Character {
var testValues: UInt8? {
View gist:3148d079b87f8b7ba65cf11c14d9d014
import Cocoa
// a = 97
// z = 122
let value = UInt8(ascii: "z")
extension Character {
var testValues: UInt8? {
View Array+mode.swft
import Foundation
extension Array where Element: Hashable {
/// Returns most popular member of the array
///
/// - SeeAlso: https://en.wikipedia.org/wiki/Mode_(statistics)
///
typealias ArrayMode = (item: Element?, count: Int)
func mode() -> (item: Element?, count: Int) {
You can’t perform that action at this time.