Sha256: 1965167dbb66aba91f45b669aa788f1d929118d876923f8873ab1d962dac186a

Contents?: true

Size: 588 Bytes

Versions: 8

Compression:

Stored size: 588 Bytes

Contents

Tree = Algebrick.type do |tree|
  variants Empty = type,
           Leaf  = type { fields Integer },
           Node  = type { fields tree, tree }
end                                                # => Tree(Empty | Leaf | Node)
# Which sets 4 modules representing these types in current module/class
Tree                                               # => Tree(Empty | Leaf | Node)
Empty                                              # => Empty
Leaf                                               # => Leaf(Integer)
Node                                               # => Node(Tree, Tree)

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
algebrick-0.7.5 doc/tree1.out.rb
algebrick-0.7.4 doc/tree1.out.rb
algebrick-0.7.3 doc/tree1.out.rb
algebrick-0.7.2 doc/tree1.out.rb
algebrick-0.7.1 doc/tree1.out.rb
algebrick-0.7.0 doc/tree1.out.rb
algebrick-0.6.0 doc/tree1.out.rb
algebrick-0.5.0 doc/tree1.out.rb