List of partial functions: Difference between revisions
Josephcsible (talk | contribs) (→List functions: scanr and scanr1 are bottom on infinite lists) |
Josephcsible (talk | contribs) ("filter (const False) [1..]" and "dropWhile (const True) [1..]" are both bottom) |
||
Line 23: | Line 23: | ||
* cycle | * cycle | ||
* !! | * !! | ||
* filter (∞) | |||
* dropWhile (∞) | |||
* length (∞) | * length (∞) | ||
* sum (∞) | * sum (∞) |
Revision as of 17:17, 22 February 2019
Partial functions in Prelude
Functions that aren't even partial
- error
- undefined
List functions
- maximum
- minimum
- head
- tail
- init
- last
- foldl (∞)
- foldl' (∞)
- foldl1
- foldl1'
- foldr1
- scanr (∞)
- scanr1 (∞)
- cycle
- !!
- filter (∞)
- dropWhile (∞)
- length (∞)
- sum (∞)
- product (∞)
- reverse (∞)
Other
- read
- quot
- rem
- quotRem
- div
- mod
- divMod
- succ
- pred
- toEnum
- (^)
- fail
- ... (todo)
Partial functions in other base libraries
Data.List
- genericIndex
- genericLength (∞)
Data.Map
- (!)
Data.Maybe
- fromJust
Partial functions in other Haskell Platform packages
... (todo)
NB. Functions marked with (∞) are partial because the function will not terminate if given an infinite list.