"Safer" implementation of Data.List.NonEmpty (and some other suggestions)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

"Safer" implementation of Data.List.NonEmpty (and some other suggestions)

박신환

Those implementations using the nontotal `fromList`seem inefficient and potentially dangerous.

 

To eliminate those, I wrote a modification of the original file, which is enclosed.

 

Some other suggestions:

 

    `insertBy` for `NonEmpty`s

 

    `NonEmpty [a]` to `[NonEmpty a]` transposition

 

    Add fixity for (:|) as `infixl 4 :|` 


_______________________________________________
Libraries mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries

=?utf-8?B?Tm9uRW1wdHkuaHM=?= (23K) Download Attachment