ligo/src/test/contracts/tuple.ligo
John David Pressman 62fe576bc9 Revert "Merge branch 'fix/pascal-tuples-in-doc' into 'dev'"
This reverts merge request !437
2020-02-20 05:25:30 +00:00

23 lines
444 B
Plaintext

type abc is (int * int * int)
function projection_abc (const tpl : abc) : int is
block { skip } with tpl.1
function modify_abc (const tpl : abc) : abc is
block {
tpl.1 := 2048 ;
} with tpl
type foobar is (int * int)
const fb : foobar = (0, 0)
function projection (const tpl : foobar) : int is
begin
skip
end with tpl.0 + tpl.1
type big_tuple is (int * int * int * int * int)
const br : big_tuple = (23, 23, 23, 23, 23)