pandoc --from=markdown --output=my.pdf my.md \
--variable=geometry:"margin=0.5cm, paperheight=421pt, paperwidth=595pt" \
--highlight-style=espresso
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extension Player : Arbitrary { | |
public static var arbitrary : Gen<Player> { | |
return Gen<Player>.fromElementsOf([Player.one, Player.two]) | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extension PointData : Arbitrary { | |
public static var arbitrary : Gen<PointData> { | |
return Gen<(Point, Point)>.zip(Point.arbitrary, Point.arbitrary).map(PointData.init) | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func generateSequenceOf(lengthSmallerThan n : Int) -> Gen<ArrayOf<Player>> { | |
return ArrayOf<Player>.arbitrary.suchThat{ $0.getArray.count < n } | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Bow | |
import Foundation | |
typealias FormValidationResult<T> = ValidatedNEA<FormError, T> | |
struct Form: Equatable { | |
let firstName: String | |
let lastName: String | |
let birthday: Date | |
let documentId: String |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Bow | |
import BowEffects | |
typealias UserID = String | |
struct UserProfile: Equatable { | |
let name: String | |
} | |
protocol Database { | |
var database: DatabaseService { get } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import SwiftUI | |
let LINE_LENGTH: Double = 500.0 | |
let N = 720 | |
let LINES = 18 | |
let WAVES: Double = 18.0 | |
let WAVE_HEIGHT: Double = 20 | |
let SPACING: Double = 27.0 | |
let CURL_AMOUNT: Double = 12.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import SwiftUI | |
struct CircleWave: Shape { | |
let N = 360 | |
let SPEED: Double = 1 / 1000.0 | |
let SHIFT: Double = 2 * Double.pi / 3 | |
let FREQUENCY: Double = 8 | |
var factor: Double | |
var colorIndex: Double | |
OlderNewer