Logo

Programming-Idioms

  • Erlang
def x = items.last()

throws NoSuchElementException if items is empty array or collection
x = lists:last(items),
X := Items'Last

X must be declared earlier.

New implementation...