ksss/type_struct

Is it possible to define a recursive structure?

aoyama-val opened this issue · 3 comments

For example, binary tree:

require "type_struct"

Node = TypeStruct.new(
  left: Node,
  right: Node,
)

=>

node.rb:4:in `<main>': uninitialized constant Node (NameError)
ksss commented

@aoyama-val Sorry for late.
It is not possible yet.
And I have no idea about implementation.

Thanks for reply.
That's a shame, but I know it's difficult, if possible. I really like the idea of this gem.
Please close the issue if you don't mind.

ksss commented

Thank you for a good idea.