amnh / PCG

𝙋𝙝𝙮𝙡𝙤𝙜𝙚𝙣𝙚𝙩𝙞𝙘 𝘾𝙤𝙢𝙥𝙤𝙣𝙚𝙣𝙩 𝙂𝙧𝙖𝙥𝙝 ⸺ Haskell program and libraries for general phylogenetic graph search
28 stars 1 forks source link

Data.Vector.NonEmpty.unfoldr is incorrect #68

Closed recursion-ninja closed 6 years ago

recursion-ninja commented 6 years ago

Requires manual definition, cannot just reused Data.Vector.unfoldr.

recursion-ninja commented 6 years ago

The non-empty vector required a modified type signature for the generating function to ensure that at least one element was generated while unfolding. Consequently, the implementation had to be changed because the generating function had a slightly different type signature. Couldn't simply wrap the unfoldr function from the possibly empty vector library.

This has been implemented in master, see 66df579.