Emoji code.

/Emoji code.

Swift, Apple’s multi-purpose programming language for its various platforms, apparently supports full Unicode.

The actual intent of this is to assist programmers whose native languages use non-Roman character sets. The practical result is that it means you can type code that looks like:

infix operator ⛏ {}
public func ⛏(set: Set, count: Int) -> Set {
    func rnd(i: Int) -> Int {return Int(arc4random_uniform(UInt32(i)))}
    var items = set, chosenItems: Set = []
    (1...count).forEach { _ in
        let whichOne = items
    return chosenItems

Set(["a", "b", "c", "d", "e"]) ⛏ 3 // pick 3 members
2018-04-27T13:58:50+00:00 2nd April, 2016|Tags: programming|Comments Off on Emoji code.