view test/bug-52851/script2.m @ 31206:7ae0a0772e9d

maint: merge stable to default
author Arun Giridhar <arungiridhar@gmail.com>
date Sun, 28 Aug 2022 12:21:36 -0400
parents d45d1b4bb919
children
line wrap: on
line source

1; %script identifier

function r = caller (fun)
  r = fun ();
endfunction

function r = computation ()
  r = 1;
endfunction

r1 = caller (@computation);

function r = computation ()
  r = 2;
endfunction

r2 = caller (@computation);