Skip to content

Trouble running Readme Example #13

@gregberns

Description

@gregberns

I had issues running the code in the Readme. Here are a couple changes that I needed to make using purs 0.12.1.

# add `toUnfoldable` based on this article https://stackoverflow.com/questions/40508767/convert-an-array-to-a-list-in-purescript
import Data.Array (toUnfoldable)
# add `either`
import Data.Either (either)

#                                                Parens need to be added
#                                                 V   V
isTrue exp = either (\_-> false) ((==) (exp :: List (List String)))

# use `toUnfoldable`
testResult = toUnfoldable $ toUnfoldable <$> [["a", "", "c", ""], ["", "1", "2", "3"], ["x", "field,quoted", "z"], [""]]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions