Sign in
◑
Theme
opensecura
/
3p
/
nicta
/
cogent
/
8a35eea7a1f65b9ba9006567c2703aab20dfaf43
/
.
/
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