Skip to content

Latest commit

 

History

History
 
 

3.1

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

Exercise 3.1: Stringy beans

Flex your generics muscles a little now, by writing a generic function constrained by fmt.Stringer.

Your job here is to write a generic function StringifyTo[T] that takes an io.Writer and a value of some arbitrary type constrained by fmt.Stringer, and prints the value to the writer.

If you're not sure what to do, peek at Solution 3.1 for hints.


Index - Next