buzz icon indicating copy to clipboard operation
buzz copied to clipboard

Protocol generics

Open giann opened this issue 2 years ago • 0 comments

protocol Countable::<T> {
    fun add(T value) > void;
}

object Item{}

object(Countable::<Item>) Person {
    [Item] items,

    fun add(Item value) > void {
        this.items.append(value);
    }
}

giann avatar Oct 15 '23 13:10 giann