This file contains hidden or 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
Trăm năm trong cõi người ta, | |
Chữ tài chữ mệnh khéo là ghét nhau. | |
Trải qua một cuộc bể dâu, | |
Những điều trông thấy mà đau đớn lòng. | |
Lạ gì bỉ sắc tư phong, | |
Trời xanh quen thói má hồng đánh ghen. | |
Cảo thơm lần giở trước đèn, | |
Phong tình có lục còn truyền sử xanh. | |
Rằng năm Gia Tĩnh triều Minh, | |
Bốn phương phẳng lặng, hai kinh vững vàng. |
This file contains hidden or 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
class A { | |
@ReadersWriter var a = 1 | |
} | |
public final class ReadersWriterLock { | |
private var lock: UnsafeMutablePointer<pthread_rwlock_t> | |
public init() { | |
self.lock = UnsafeMutablePointer.allocate(capacity: 1) | |
let status = pthread_rwlock_init(lock, nil) |
This file contains hidden or 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
//Emojify https://github.com/thoughtbot/Curry/blob/master/Source/Curry.swift | |
import Foundation | |
public func 🍛<🐶, 😺>(_ function: @escaping (🐶) -> 😺) -> (🐶) -> 😺 { | |
return { (a: 🐶) -> 😺 in function(a) } | |
} | |
public func 🍛<🐶, 😺, 🐭>(_ function: @escaping (🐶, 😺) -> 🐭) -> (🐶) -> (😺) -> 🐭 { | |
return { (a: 🐶) -> (😺) -> 🐭 in { (b: 😺) -> 🐭 in function(a, b) } } | |
} |