- Author: Richard Wei
- Date: October 2018
This document is written for both the machine learning community and the Swift programming language design community, with a strong focus on language design.
import Foundation | |
struct Point: Equatable, CustomStringConvertible { | |
let x: Int | |
let y: Int | |
init(_ x: Int, _ y: Int) { | |
self.x = x | |
self.y = y | |
} |
This document is written for both the machine learning community and the Swift programming language design community, with a strong focus on language design.
Inspired from https://drboolean.gitbooks.io/mostly-adequate-guide/content/ch5.html | |
// Curries by partially applying 1 out of 2 arguments | |
func curry<A, B, C>(fn: (A, B) -> C, _ val: A) -> (B -> C) { | |
return { b in | |
fn(val, b) | |
} | |
} | |
// "compose" operator |
<html> | |
<body> | |
<script type='text/javascript'> | |
(function(){ | |
try{ | |
var msg = '\n _\n (_)\n _ _ __ ___ __ _ _ _ _ __\n | | \'_ ` _ \\ / _` | | | | \'__|\n | | | | | | | (_| | |_| | |\n |_|_| |_| |_|\\__, |\\__,_|_|\n __/ |\n |___/\n'; | |
msg += '========================================\nYou opened the console! Know some code,\ndo you? Want to work for one of the best\nstartups around? http://imgur.com/jobs\n========================================\n'; | |
console.log(msg); | |
}catch(e){} | |
})() |
I hereby claim:
To claim this, I am signing this object:
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | |
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="7706" systemVersion="14E46" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="vXZ-lx-hvc"> | |
<dependencies> | |
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="7703"/> | |
<capability name="Constraints with non-1.0 multipliers" minToolsVersion="5.1"/> | |
</dependencies> | |
<scenes> | |
<!--View Controller--> | |
<scene sceneID="ufC-wZ-h7g"> | |
<objects> |