I hereby claim:
- I am fcanas on github.
- I am fcanas (https://keybase.io/fcanas) on keybase.
- I have a public key whose fingerprint is D5AC E5A4 D764 1040 F907 DB29 42DB B883 EBAC E404
To claim this, I am signing this object:
| (ns your-ride-is-here-test | |
| [:require [clojure.test :refer :all]]) | |
| (defn decode [e] | |
| (mod (reduce (fn [total, value] (* total value)) 1 (map (fn [a] (- (int a) 64)) (seq e))) 47) | |
| ) | |
| (defn ride [group, comet] | |
| (if (= (decode group) (decode comet)) "GO" "STAY") | |
| ) |
| (ns squared-same-test | |
| (:require [clojure.test :refer :all] [clojure.set :refer :all]) ) | |
| (defn function_maps_sets [f, a, b] | |
| (= 0 (count (difference (set b) (set (map f a))))) | |
| ) | |
| (defn function_is_map_between_sets [f, a, b] | |
| (def setA (set a)) | |
| (def setB (set b)) |
| public struct Distance :NumericType { | |
| public var value :Double | |
| public init(_ value: Double) { | |
| self.value = value | |
| } | |
| } | |
| extension Distance :IntegerLiteralConvertible { | |
| public init(integerLiteral: IntegerLiteralType) { | |
| self.init(Double(integerLiteral)) |
| import UIKit | |
| let white = UIColor.whiteColor().CGColor | |
| let black = UIColor.blackColor().CGColor | |
| let w :CGFloat = 105 | |
| let h :CGFloat = 60 | |
| let size = CGSizeMake(w, h) | |
| UIGraphicsBeginImageContextWithOptions(size, true, 0.0) |
| ; To run: | |
| ; | |
| ; $ lein repl | |
| ; $ (load-file "shell_game_test.clj") | |
| (ns the-shell-game-test | |
| (:require [clojure.test :refer :all])) | |
| (defn move-the-ball [position, move] | |
| (nth (concat [position] (reverse move)) (+ 1 (.indexOf move position))) |
| typealias ø = ((Int -> Int) -> Int -> Int) | |
| func i<T>(v :T) -> T { | |
| return v | |
| } | |
| func c<T>(n: Int) -> (T -> T) -> T -> T { | |
| if n == 0 { | |
| return { x in i } | |
| } |
| func flipOn<T: RawOptionSetType>(value: T, change: T) -> T { | |
| return T(rawValue: value.rawValue | change.rawValue ) | |
| } | |
| func flipOff<T: RawOptionSetType>(value: T, change: T) -> T { | |
| return T(rawValue: value.rawValue & ~change.rawValue ) | |
| } | |
| func toggle<T: RawOptionSetType>(value: T, change: T) -> T { | |
| return T(rawValue: value.rawValue ^ change.rawValue ) |
| # [Bret Victor](http://worrydream.com/) | |
| * [Inventing on Principle](http://www.youtube.com/watch?v=PUv66718DII) | |
| * [The Future of Programming](http://vimeo.com/71278954) | |
| * [Stop Drawing Dead Fish](http://vimeo.com/64895205) | |
| # Doug Engelbart | |
| * [The Mother of All Demos](http://www.youtube.com/watch?v=yJDv-zdhzMY) - 1968 Ridiculousness |
I hereby claim:
To claim this, I am signing this object: