21 lines
338 B
Swift
21 lines
338 B
Swift
import Playgrounds
|
|
import Foundation
|
|
|
|
|
|
var bike = Bike.trek
|
|
let train = Train { Bike.trek }
|
|
|
|
@resultBuilder struct BikeBuilder {
|
|
static func buildBlock(_ components: Bike) -> Bike {
|
|
components
|
|
}
|
|
}
|
|
|
|
#Playground {
|
|
// bike.price
|
|
// train.makeSomeNoise("Choo Choo!")
|
|
for bike in Bike.all {
|
|
bike
|
|
}
|
|
|
|
}
|