ligo/src/test/contracts/list.mligo

11 lines
219 B
Plaintext
Raw Normal View History

type storage = int * int list
type param = int list
let%entry main (p : param) storage =
let storage =
match p with
[] -> storage
| hd::tl -> storage.(0) + hd, tl
in (([] : operation list), storage)