Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
arasan01 committed Dec 1, 2023
1 parent 56205db commit 7153d43
Showing 1 changed file with 23 additions and 16 deletions.
39 changes: 23 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,24 +32,31 @@ extension DependencyValues {

@DependencyProtocolClient(implemented: Implements.self)
public protocol GreatTool {
func move() async
func play(name: String) async -> String
func stop(_ b: Double) async throws -> Double
func yes(_ what: inout String) async -> Bool
func move() async
func play(name: String) async -> String
func stop(_ b: Double) async throws -> Double
func yes(_ what: inout String) async -> Bool
}

public actor AImplements: AGreatTool {
var x = 1
var y = 1.0
public func yes(_ what: inout String) -> Bool { true }
public func foo(a: Int) -> Int {
x += 1
return x
}
public func hoge(_ b: Double) throws -> Double {
y += 1
return y
}
public actor Implements: GreatTool {
var inState = 1
public func yes(_ what: inout String) async -> Bool {
what += "!"
return true
}

public func move() async {
inState += 1
print("moving \(inState)")
}

public func play(name: String) async -> String {
name + "playing"
}

public func stop(_ b: Double) async throws -> Double {
return b
}
}
```

Expand Down

0 comments on commit 7153d43

Please sign in to comment.