Schulung_iOS/Playground.swift
2025-10-24 14:35:06 +02:00

24 lines
490 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
// }
let numbers = ["1","2","3","4","3","asd"]
let intNumbers = numbers.compactMap{ Int($0) ?? -1}
let uniqNumbers = numbers.map{ Int($0)}
}