Sitelet https://github.com/purescript/purescript-lists/issues/123
Skip to content

Add ToList class #123

Description

@natefaubion

As an alternative to purescript/purescript-foldable-traversable#69, we could add a class:

class ToList f where
  toList :: forall a. f a -> LL.List a
  foldrLazy :: forall a b. Z.Lazy b => (a -> b -> b) -> b -> f a -> b

Where

toList f = foldrLazy LL.cons LL.nil f
foldrLazy cons nil f = LL.foldrLazy cons nil (toList f)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions