Logo

Programming-Idioms

History of Idiom 165 > diff from v33 to v34

Edit summary for version 34 by programming-idioms.org:
[Haskell] Emphasize comments

Version 33

2019-07-03, 17:01:42

Version 34

2019-07-10, 12:08:15

Idiom #165 Last element of list

Assign to variable x the last element of list items.

Idiom #165 Last element of list

Assign to variable x the last element of list items.

Code
x = last items
Code
x = last items
Comments bubble
Crashes if items is empty, but based on the description, that seems fine.
Comments bubble
Crashes if items is empty