Add tasks for all the new languages

This commit is contained in:
Tina Müller 2016-12-05 23:44:36 +01:00
parent 9dc3c2bb62
commit bba7bfd280
13208 changed files with 134745 additions and 0 deletions

View file

@ -0,0 +1,21 @@
type
Eatable = generic e
eat(e)
FoodBox[e: Eatable] = seq[e]
Food = object
name: string
count: int
proc eat(x: int) = echo "Eating the int: ", x
proc eat(x: Food) = echo "Eating ", x.count, " ", x.name, "s"
var ints = FoodBox[int](@[1,2,3,4,5])
var fs = FoodBox[Food](@[])
fs.add Food(name: "Hamburger", count: 3)
fs.add Food(name: "Cheeseburger", count: 5)
for f in fs:
eat(f)