diff --git a/Covariance/.idea/misc.xml b/Covariance/.idea/misc.xml
new file mode 100644
index 0000000..0548357
--- /dev/null
+++ b/Covariance/.idea/misc.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Covariance/.idea/modules.xml b/Covariance/.idea/modules.xml
new file mode 100644
index 0000000..5e0db88
--- /dev/null
+++ b/Covariance/.idea/modules.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Covariance/.idea/workspace.xml b/Covariance/.idea/workspace.xml
new file mode 100644
index 0000000..c509389
--- /dev/null
+++ b/Covariance/.idea/workspace.xml
@@ -0,0 +1,564 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1482750416301
+
+
+ 1482750416301
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Covariance/Covariance.iml b/Covariance/Covariance.iml
new file mode 100644
index 0000000..4bbbf67
--- /dev/null
+++ b/Covariance/Covariance.iml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Covariance/src/Coda.scala b/Covariance/src/Coda.scala
new file mode 100644
index 0000000..488cd91
--- /dev/null
+++ b/Covariance/src/Coda.scala
@@ -0,0 +1,19 @@
+/**
+ * Created by claudio on 26/12/16.
+ */
+trait Coda[T] {
+ def head: T
+ def tail: Coda[T]
+ def accoda(elem: T): Coda[T]
+}
+
+object Coda {
+ def apply[T](cose: T*): Coda[T] = new CodaImpl(cose.toList, Nil)
+ def apply[T](list: List[T]): Coda[T] = new CodaImpl(list, Nil)
+ private class CodaImpl[T](private val heading: List[T], private val tailing: List[T]) extends Coda[T]{
+ def head: T = heading.head
+ def tail = Coda(heading.tail ::: tailing)
+ }
+}
+
+
diff --git a/Covariance/src/Main/Main.scala b/Covariance/src/Main/Main.scala
new file mode 100644
index 0000000..678e3ed
--- /dev/null
+++ b/Covariance/src/Main/Main.scala
@@ -0,0 +1,13 @@
+package Main
+import Randominator.Randominator
+
+/**
+ * Created by claudio on 26/12/16.
+ */
+object Main {
+ def main(argv: Array[String]): Unit = {
+ val r = new Randominator[Int](List(1,2,3,4,5,6))
+ val s: Randominator[Any] = r
+ println(s.getRandom)
+ }
+}
diff --git a/Covariance/src/Randominator/Randominator.scala b/Covariance/src/Randominator/Randominator.scala
new file mode 100644
index 0000000..65ac3fe
--- /dev/null
+++ b/Covariance/src/Randominator/Randominator.scala
@@ -0,0 +1,10 @@
+package Randominator
+
+/**
+ * Created by claudio on 26/12/16.
+ */
+class Randominator[+T](toSelect: List[T]) {
+ def getRandom: T = toSelect((math.random() * toSelect.length).toInt)
+
+ def add[U >: T](x: U): Randominator[U] = new Randominator[U](x :: toSelect)
+}
diff --git a/Lists/.idea/misc.xml b/Lists/.idea/misc.xml
index c6d8fb7..9afa13c 100644
--- a/Lists/.idea/misc.xml
+++ b/Lists/.idea/misc.xml
@@ -10,17 +10,7 @@
-
-
-
-
-
-
-
-
-
-
-
+
\ No newline at end of file
diff --git a/Lists/.idea/workspace.xml b/Lists/.idea/workspace.xml
index 98ffefd..1595264 100644
--- a/Lists/.idea/workspace.xml
+++ b/Lists/.idea/workspace.xml
@@ -20,12 +20,12 @@
-
+
-
-
+
+
@@ -54,18 +54,9 @@
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
@@ -82,14 +73,11 @@
+
+
+
-
-
-
-
-
-
@@ -120,40 +108,18 @@
-
-
-
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
@@ -175,7 +141,11 @@
+
+
+
+
@@ -239,27 +209,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -314,36 +263,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -372,49 +291,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -433,6 +309,30 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -447,6 +347,9 @@
+
+
+
@@ -458,33 +361,37 @@
-
+
-
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
-
+
-
-
+
+
+
@@ -509,18 +416,50 @@
-
+
-
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+