//
//  SwiftUIBindingExtension.swift
//  Zockerhoehle
//
//  Created by Julian-Steffen Müller on 18.05.21.
//  Copyright © 2021 Julian-Steffen Müller. All rights reserved.
//

import Foundation
import SwiftUI

func ??<T>(lhs: Binding<Optional<T>>, rhs: T) -> Binding<T> {
    Binding(
        get: { lhs.wrappedValue ?? rhs },
        set: { lhs.wrappedValue = $0 }
    )
}
