Logo

Programming-Idioms

History of Idiom 171 > diff from v33 to v34

Edit summary for version 34 by programming-idioms.org:
[Haskell] Variable names x, s

Version 33

2020-07-19, 19:00:09

Version 34

2020-07-20, 08:57:14

Idiom #171 Add an element at the end of a list

Append element x to the list s.

Idiom #171 Add an element at the end of a list

Append element x to the list s.

Variables
x,s
Variables
x,s
Extra Keywords
push grow
Extra Keywords
push grow
Code
append x xs = xs ++ [x]
Code
xs = s ++ [x]
Comments bubble
This creates a new list xs