vextoly/cryn

[# transform references: apply two different strategies through one caller #]
make int64 log

define ping result nothing
  move log
  read
  add 1
  move log
  write
  set nothing
  return
end

define pong result nothing
  move log
  read
  add 10
  move log
  write
  set nothing
  return
end

define twice transform f result nothing
  move f
  read
  push
  call
  pop
  call
  set nothing
  return
end

define main
  set 0
  move log
  write

  address ping
  push
  call twice

  address pong
  push
  call twice

  move log
  read
  output
  return
end