how do you tell if a list is empty in an expression context?

```
ghci> :t null
null :: Foldable t => t a -> Bool
ghci> null []
True
ghci> null [2,4]
False
```

except, it's an instance of foldable

```
ghci> null Nothing
True
ghci> null Left "okay"
True
```

😭

Follow

@redmp List is Foldable. What is the problem here?..

Sign in to participate in the conversation
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.