Mercurial > octave
view test/bug-41723/class_bug41723.m @ 31247:3dae836c598c
doc: Expand and edit documentation for memoization (bug #60860)
author | Arun Giridhar <arungiridhar@gmail.com> |
---|---|
date | Fri, 30 Sep 2022 06:38:59 -0400 |
parents | 67a638ac7f24 |
children |
line wrap: on
line source
classdef class_bug41723 < handle properties value endproperties methods function obj = class_bug41723 () obj.value = helper_function (); endfunction function val = getval (obj) val = helper_function_2 (); endfunction endmethods endclassdef function y = helper_function () y = 42; endfunction function y = helper_function_2 (in) if (! nargin) y = helper_function_2 (true); else y = 2 * helper_function (); endif endfunction