I am a beginner with Swift, so I was confused struct in swift.
When I read The chapter about "first-class-value",you say that if replace the "typealias Region = (Position) -> Bool" to "struct Region {
let lookup: (Position) -> Bool
}" and use extensions the code will work better.I tried it but I cannot complete, but I really want know how to do it. Can you show the code for me, if you had.thanks vary much.
I know my request is a little too much.if you have no time, i will be grateful to you. your books open my eyes.
I am a beginner with Swift, so I was confused struct in swift.
When I read The chapter about "first-class-value",you say that if replace the "typealias Region = (Position) -> Bool" to "struct Region { let lookup: (Position) -> Bool }" and use extensions the code will work better.I tried it but I cannot complete, but I really want know how to do it. Can you show the code for me, if you had.thanks vary much.
I know my request is a little too much.if you have no time, i will be grateful to you. your books open my eyes.