Logo

Programming-Idioms

History of Idiom 165 > diff from v32 to v33

Edit summary for version 33 by morteako:
New Haskell implementation by user [morteako]

Version 32

2019-03-08, 22:57:38

Version 33

2019-07-03, 17:01:42

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
Comments bubble
Crashes if items is empty, but based on the description, that seems fine.