How to implement a isEmpty function

i am beginner for purescript, i want to know

how to implement a isEmpty function ,

can judge Array '' or something else value is empty

like ramda isEmpty

The Data.Foldable.null function will will return True if anything which has a Foldable instance is empty.

https://pursuit.purescript.org/packages/purescript-foldable-traversable/6.0.0/docs/Data.Foldable#v:null

An Array has a Foldable instance, so null will work on an Array.

https://pursuit.purescript.org/packages/purescript-foldable-traversable/6.0.0/docs/Data.Foldable#t:Foldable

3 Likes