init list helper
This commit is contained in:
parent
6110679bee
commit
2bbd01485a
|
@ -209,6 +209,10 @@ in rec {
|
||||||
assert list != []; elemAt list (dec (length list));
|
assert list != []; elemAt list (dec (length list));
|
||||||
|
|
||||||
|
|
||||||
|
# Return all elements but the last
|
||||||
|
init = list: assert list != []; take (length list - 1) list;
|
||||||
|
|
||||||
|
|
||||||
# Zip two lists together.
|
# Zip two lists together.
|
||||||
zipTwoLists = xs: ys:
|
zipTwoLists = xs: ys:
|
||||||
let
|
let
|
||||||
|
|
Loading…
Reference in a new issue