mirror of
https://github.com/ivanvorobei/SwiftUI.git
synced 2026-04-20 07:41:28 +02:00
Add 2048 Game
This commit is contained in:
13
Examples/2048 Game/SwiftUI2048/FunctionalUtils.swift
Executable file
13
Examples/2048 Game/SwiftUI2048/FunctionalUtils.swift
Executable file
@@ -0,0 +1,13 @@
|
||||
//
|
||||
// FunctionalUtils.swift
|
||||
// SwiftUI2048
|
||||
//
|
||||
// Created by Hongyu on 6/5/19.
|
||||
// Copyright © 2019 Cyandev. All rights reserved.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
func bind<T, U>(_ x: T, _ closure: (T) -> U) -> U {
|
||||
return closure(x)
|
||||
}
|
||||
Reference in New Issue
Block a user