Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialVladimir Taranik
4,841 PointsI can't understand this at all
Can someone tell the solution for this task? I will be very happy!
1 Answer
Jhoan Arango
14,575 PointsHello,
To name an associated type, this is what you need to do.
protocol ConfigurableRow {
associatedtype Object
func configure(with object: Object)
}
Hope this helps you.
Vladimir Taranik
4,841 PointsVladimir Taranik
4,841 PointsCan't understand this task, how to write this code:
"Let's get some practice in creating a protocol with an associated type so we're familiar with the syntax.
Declare a protocol named ConfigurableRow with an associated type object.
Add a single requirement to the protocol - a function named configure with a single argument of type Object. Give the function an external name of with and local name of object."