recursion - Return an infinite tree consisting of only nodes in Haskell -



recursion - Return an infinite tree consisting of only nodes in Haskell -

given next simple tree

info tree = leaf | node tree tree deriving (eq, show)

is there way homecoming infinite amount of nodes (a tree nodes, no leaves) using recursion?

so far know how homecoming info types such boolean , integer. how start returning tree ?

infinitetree :: tree infinitetree = node infinitetree infinitetree

haskell recursion tree infinite algebraic-data-types

Comments

Popular posts from this blog

c - Compilation of a code: unkown type name string -

ubuntu - Bash Script to Check That Files Are Being Created -

Php operator `break` doesn't stop while -