Slide 14
Slide 14 text
The Ruby signature language
• Ruby-like but different syntax
• Defines the structure of Ruby programs
• Classes, modules, mixin, and interfaces
• Methods and instance variables
• Generics, unions, tuples, optionals, ...
• You can write types for most of the Ruby programs
class Array[A]
include Enumerable
def []=: (Integer, A) -> A
def []: (Integer) -> A?
def each: { (A) -> void } -> self
def partition: { (A) -> bool } ->
[Array[A], Array[A]]
...
end
WIP