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
```

😭

@redmp Has this been changed between #Haskell versions? If so, why wasn't also the name "map" re-used for Functors rather than coming up with the somewhat strange name "fmap"?

Follow

@das_g @redmp Not gonna happen until Data.List migrates to that `containers`-like API.

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.