Sign in
opensecura
/
3p
/
nicta
/
cogent
/
467b5dd3d8154baaa2ba188fa7382b79cdb70b6e
/
.
/
impl
/
fs
/
bilby
/
proof
/
spec
/
List.hs
blob: 3c2297460269ab22b8f0d0cabf0b73b935c3e80f [
file
]
module
List
where
butlast
::
[
a
]
->
[
a
]
butlast
[]
=
[]
butlast
(
x
:
xs
)
=
if
null xs
then
[]
else
x
:
butlast xs
fold
::
(
a
->
b
->
b
)
->
[
a
]
->
b
->
b
fold f
[]
=
id
fold f
(
x
:
xs
)
=
fold f xs
.
f x