Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is scanl1 really partial?

According to the Haskell wiki, the scanl1 function is partial. I don't understand what inputs result in bottom, though. For list functions, I'm used to the problem inputs either being empty lists (like for head) or infinite ones (like for reverse). However, scanl1 seems to handle both of these types of lists correctly. Is this actually a partial function? If so, what's an example of an input that will result in bottom?

like image 485
Joseph Sible-Reinstate Monica Avatar asked Feb 07 '19 16:02

Joseph Sible-Reinstate Monica


1 Answers

That's a mistake on the wiki. scanl1 is in fact total. (I've updated the wiki.)

like image 181
Li-yao Xia Avatar answered Oct 29 '22 07:10

Li-yao Xia